a few more feature requests:
1. options for setting priority and affinity as in the "start" command: /low, /high...
2. special template for compressors benchmarking:
1,000,000,000 -> 252,474,982: 25.25% Cpu 6 mb/s (147.889 sec), real 11 mb/s (87.219 sec) = 170%
here the first two numbers are bytes in and out, respectively. then origsize=max(insize,outsize), compsize=min(insize,outsize), ratio=compsize/origsize, speeds are measured relative to origsize (not compsize!)
3. print large numbers with "," delimiter. i do it using the following procedure:
Code:
static char* show3 (uint64_t n, char *buf, const char *prepend=""){
char *p = buf + 27+strlen(prepend);
int i = 4;
*p = '\0';
do {
if (!--i) *--p = ',', i = 3;
*--p = '0' + (n % 10);
} while (n /= 10);
memcpy (p-strlen(prepend), prepend, strlen(prepend));
return p-strlen(prepend);
}
Usage:
char temp1[100], temp2[100];
fprintf(stderr, "Compressed %s -> %s bytes = %.2lf%%\n", show3(origsize,temp1), show3(compsize,temp2), (double(compsize)/origsize)*100);