diff options
-rw-r--r-- | lib/talloc/testsuite.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/talloc/testsuite.c b/lib/talloc/testsuite.c index 5eab839f51d..dd49df1f982 100644 --- a/lib/talloc/testsuite.c +++ b/lib/talloc/testsuite.c @@ -36,16 +36,16 @@ #include "talloc_testsuite.h" -static struct timeval timeval_current(void) +static struct timeval private_timeval_current(void) { struct timeval tv; gettimeofday(&tv, NULL); return tv; } -static double timeval_elapsed(struct timeval *tv) +static double private_timeval_elapsed(struct timeval *tv) { - struct timeval tv2 = timeval_current(); + struct timeval tv2 = private_timeval_current(); return (tv2.tv_sec - tv->tv_sec) + (tv2.tv_usec - tv->tv_usec)*1.0e-6; } @@ -835,7 +835,7 @@ static bool test_speed(void) printf("test: speed\n# TALLOC VS MALLOC SPEED\n"); - tv = timeval_current(); + tv = private_timeval_current(); count = 0; do { void *p1, *p2, *p3; @@ -848,15 +848,15 @@ static bool test_speed(void) talloc_free(p1); } count += 3 * loop; - } while (timeval_elapsed(&tv) < 5.0); + } while (private_timeval_elapsed(&tv) < 5.0); - fprintf(stderr, "talloc: %.0f ops/sec\n", count/timeval_elapsed(&tv)); + fprintf(stderr, "talloc: %.0f ops/sec\n", count/private_timeval_elapsed(&tv)); talloc_free(ctx); ctx = talloc_pool(NULL, 1024); - tv = timeval_current(); + tv = private_timeval_current(); count = 0; do { void *p1, *p2, *p3; @@ -869,13 +869,13 @@ static bool test_speed(void) talloc_free(p1); } count += 3 * loop; - } while (timeval_elapsed(&tv) < 5.0); + } while (private_timeval_elapsed(&tv) < 5.0); talloc_free(ctx); - fprintf(stderr, "talloc_pool: %.0f ops/sec\n", count/timeval_elapsed(&tv)); + fprintf(stderr, "talloc_pool: %.0f ops/sec\n", count/private_timeval_elapsed(&tv)); - tv = timeval_current(); + tv = private_timeval_current(); count = 0; do { void *p1, *p2, *p3; @@ -888,8 +888,8 @@ static bool test_speed(void) free(p3); } count += 3 * loop; - } while (timeval_elapsed(&tv) < 5.0); - fprintf(stderr, "malloc: %.0f ops/sec\n", count/timeval_elapsed(&tv)); + } while (private_timeval_elapsed(&tv) < 5.0); + fprintf(stderr, "malloc: %.0f ops/sec\n", count/private_timeval_elapsed(&tv)); printf("success: speed\n"); |