mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
Updated redis-benchmark so it doesn't show 1 value above 2ms at higher precision
This commit is contained in:
parent
07473feaeb
commit
b79efef5d6
@ -461,18 +461,18 @@ static void showLatencyReport(void) {
|
|||||||
if (config.latency[i]/usbetweenlat != curlat ||
|
if (config.latency[i]/usbetweenlat != curlat ||
|
||||||
i == (config.requests-1))
|
i == (config.requests-1))
|
||||||
{
|
{
|
||||||
curlat = config.latency[i]/usbetweenlat;
|
|
||||||
perc = ((float)(i+1)*100)/config.requests;
|
|
||||||
printf("%.2f%% <= %.*f milliseconds\n", perc, config.precision,
|
|
||||||
curlat/pow(10.0, config.precision));
|
|
||||||
|
|
||||||
/* After the 2 milliseconds latency to have percentages split
|
/* After the 2 milliseconds latency to have percentages split
|
||||||
* by decimals will just add a lot of noise to the output. */
|
* by decimals will just add a lot of noise to the output. */
|
||||||
if (config.latency[i] > 2000) {
|
if (config.latency[i] >= 2000) {
|
||||||
config.precision = 0;
|
config.precision = 0;
|
||||||
usbetweenlat = ipow(10,
|
usbetweenlat = ipow(10,
|
||||||
MAX_LATENCY_PRECISION-config.precision);
|
MAX_LATENCY_PRECISION-config.precision);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
curlat = config.latency[i]/usbetweenlat;
|
||||||
|
perc = ((float)(i+1)*100)/config.requests;
|
||||||
|
printf("%.2f%% <= %.*f milliseconds\n", perc, config.precision,
|
||||||
|
curlat/pow(10.0, config.precision));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("%.2f requests per second\n\n", reqpersec);
|
printf("%.2f requests per second\n\n", reqpersec);
|
||||||
|
Loading…
Reference in New Issue
Block a user