Merge pull request #30146 from taosdata/fix/ratio-typo
fix: typo, replace radio to ratio
This commit is contained in:
commit
651c2e57b4
|
@ -6615,12 +6615,12 @@ int32_t blockDBUsageFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
|
||||||
|
|
||||||
uint64_t totalDiskSize = pData->dataInDiskSize;
|
uint64_t totalDiskSize = pData->dataInDiskSize;
|
||||||
uint64_t rawDataSize = pData->rawDataSize;
|
uint64_t rawDataSize = pData->rawDataSize;
|
||||||
double compressRadio = 0;
|
double compressRatio = 0;
|
||||||
if (rawDataSize != 0) {
|
if (rawDataSize != 0) {
|
||||||
compressRadio = totalDiskSize * 100 / (double)rawDataSize;
|
compressRatio = totalDiskSize * 100 / (double)rawDataSize;
|
||||||
len = tsnprintf(varDataVal(st), sizeof(st) - VARSTR_HEADER_SIZE, "Compress_radio=[%.2f%]", compressRadio);
|
len = tsnprintf(varDataVal(st), sizeof(st) - VARSTR_HEADER_SIZE, "Compress_ratio=[%.2f%]", compressRatio);
|
||||||
} else {
|
} else {
|
||||||
len = tsnprintf(varDataVal(st), sizeof(st) - VARSTR_HEADER_SIZE, "Compress_radio=[NULL]");
|
len = tsnprintf(varDataVal(st), sizeof(st) - VARSTR_HEADER_SIZE, "Compress_ratio=[NULL]");
|
||||||
}
|
}
|
||||||
|
|
||||||
varDataSetLen(st, len);
|
varDataSetLen(st, len);
|
||||||
|
|
|
@ -182,7 +182,7 @@ void compressImplTestByAlg(void* pVal, int8_t type, int32_t num, uint32_t
|
||||||
|
|
||||||
DEFINE_VAR(cmprAlg)
|
DEFINE_VAR(cmprAlg)
|
||||||
int32_t len = compres.compFunc(pVal, bytes, num, px, externalSize, cmprAlg, pBuf, externalSize);
|
int32_t len = compres.compFunc(pVal, bytes, num, px, externalSize, cmprAlg, pBuf, externalSize);
|
||||||
printf("encode:%s, compress alg:%s, type:%s, compresess size: %d, actual size: %d, radio: %f\n", end[l1], alg[l2],
|
printf("encode:%s, compress alg:%s, type:%s, compresess size: %d, actual size: %d, ratio: %f\n", end[l1], alg[l2],
|
||||||
compres.name, len, bytes, (float)len / bytes);
|
compres.name, len, bytes, (float)len / bytes);
|
||||||
char* pOutput = static_cast<char*>(taosMemoryCalloc(1, externalSize));
|
char* pOutput = static_cast<char*>(taosMemoryCalloc(1, externalSize));
|
||||||
memset(pBuf, 0, externalSize);
|
memset(pBuf, 0, externalSize);
|
||||||
|
|
Loading…
Reference in New Issue