diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-03-19 22:47:57 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-03-19 22:47:57 +0200 |
commit | 5c22120e41d654ebfc8ae0adb2aa29fb84959253 (patch) | |
tree | 48514691110ec1faf05ff925e689e645568ab62a /src/unit_test.c | |
parent | e5683d1b701edb7dbdbcd0130501663947d0ecda (diff) |
better speed diff reporting
Diffstat (limited to 'src/unit_test.c')
-rwxr-xr-x | src/unit_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/unit_test.c b/src/unit_test.c index 3366ca7a44..d74cc95386 100755 --- a/src/unit_test.c +++ b/src/unit_test.c @@ -133,10 +133,10 @@ void benchmark_storage_number(int loop, int multiplier) { fprintf(stderr, "user %0.5Lf, system %0.5Lf, total %0.5Lf\n", (long double)(user / 1000000.0), (long double)(system / 1000000.0), (long double)(total / 1000000.0)); if(mine > total) { - fprintf(stderr, "NETDATA CODE IS SLOWER %0.2Lf TIMES\n", (long double)(mine / their)); + fprintf(stderr, "NETDATA CODE IS SLOWER %0.2Lf %%\n", (long double)(mine * 100.0 / their - 100.0)); } else { - fprintf(stderr, "NETDATA CODE IS F A S T E R %0.2Lf TIMES\n", (long double)(their / mine)); + fprintf(stderr, "NETDATA CODE IS F A S T E R %0.2Lf %%\n", (long double)(their * 100.0 / mine - 100.0)); } // ------------------------------------------------------------------------ @@ -167,10 +167,10 @@ void benchmark_storage_number(int loop, int multiplier) { fprintf(stderr, "user %0.5Lf, system %0.5Lf, total %0.5Lf\n", (long double)(user / 1000000.0), (long double)(system / 1000000.0), (long double)(total / 1000000.0)); if(mine > their) { - fprintf(stderr, "WITH PACKING UNPACKING NETDATA CODE IS SLOWER %0.2Lf TIMES\n", (long double)(mine / their)); + fprintf(stderr, "WITH PACKING UNPACKING NETDATA CODE IS SLOWER %0.2Lf %%\n", (long double)(mine * 100.0 / their - 100.0)); } else { - fprintf(stderr, "EVEN WITH PACKING AND UNPACKING, NETDATA CODE IS F A S T E R %0.2Lf TIMES\n", (long double)(their / mine)); + fprintf(stderr, "EVEN WITH PACKING AND UNPACKING, NETDATA CODE IS F A S T E R %0.2Lf %%\n", (long double)(their * 100.0 / mine - 100.0)); } // ------------------------------------------------------------------------ |