提交 c820edc3 编写于 作者: D dapan1121

fix bug

上级 243a3d16
...@@ -40,7 +40,7 @@ typedef struct SHeapEntry { ...@@ -40,7 +40,7 @@ typedef struct SHeapEntry {
} SHeapEntry; } SHeapEntry;
typedef struct SHistogramInfo { typedef struct SHistogramInfo {
int32_t numOfElems; int64_t numOfElems;
int32_t numOfEntries; int32_t numOfEntries;
int32_t maxEntries; int32_t maxEntries;
double min; double min;
......
...@@ -446,7 +446,7 @@ void tHistogramDestroy(SHistogramInfo** pHisto) { ...@@ -446,7 +446,7 @@ void tHistogramDestroy(SHistogramInfo** pHisto) {
} }
void tHistogramPrint(SHistogramInfo* pHisto) { void tHistogramPrint(SHistogramInfo* pHisto) {
printf("total entries: %d, elements: %d\n", pHisto->numOfEntries, pHisto->numOfElems); printf("total entries: %d, elements: %"PRId64 "\n", pHisto->numOfEntries, pHisto->numOfElems);
#if defined(USE_ARRAYLIST) #if defined(USE_ARRAYLIST)
for (int32_t i = 0; i < pHisto->numOfEntries; ++i) { for (int32_t i = 0; i < pHisto->numOfEntries; ++i) {
printf("%d: (%f, %" PRId64 ")\n", i + 1, pHisto->elems[i].val, pHisto->elems[i].num); printf("%d: (%f, %" PRId64 ")\n", i + 1, pHisto->elems[i].val, pHisto->elems[i].num);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册