chg bench readable measure

This commit is contained in:
ubuntu201711081 2020-12-06 05:25:42 +00:00
parent ee2310cb39
commit 0b148fe3f0

View File

@ -292,7 +292,7 @@ int main(int argc, const char *argv[]){
if (result.tv_sec == 0) avg = result.tv_nsec;
else avg = result.tv_sec * 1e9 + result.tv_nsec;
avg /= bench.op_count;
fprintf(stdout,"operation: %lf ns/op\n",avg);
fprintf(stdout,"operation: %lf us/op\n",avg / 1000.0);
fprintf(stdout,"resolution: %ld sec %ld ns\n",bench.resolution.tv_sec,bench.resolution.tv_nsec);
}