diff options
author | James Peach <jpeach@samba.org> | 2008-05-20 10:54:45 -0700 |
---|---|---|
committer | James Peach <jpeach@apple.com> | 2008-05-20 11:35:32 -0700 |
commit | 9a975a868e949e61cb011422363cd07b4ec0ce43 (patch) | |
tree | ecaa845c4f7b3f6b7be392ae51e04e6b72c6a016 /source4/lib | |
parent | 276fa76fa98355cc09dad4d069fd64d0be7f8655 (diff) | |
download | samba-9a975a868e949e61cb011422363cd07b4ec0ce43.tar.gz samba-9a975a868e949e61cb011422363cd07b4ec0ce43.tar.bz2 samba-9a975a868e949e61cb011422363cd07b4ec0ce43.zip |
smbtorture: Add RAW-BENCH-TCON benchmark.
Add a simple test to benchmark the rate at which a server can accept
new tree connections. You can tune the length of time to run the
benchmark for and the number of parallel connections to make.
(This used to be commit ea3f4b93057e85c4ea516cc77dd0f293016d520c)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/util/time.c | 2 | ||||
-rw-r--r-- | source4/lib/util/time.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/util/time.c b/source4/lib/util/time.c index a181885806..978d73cc0a 100644 --- a/source4/lib/util/time.c +++ b/source4/lib/util/time.c @@ -376,7 +376,7 @@ _PUBLIC_ NTTIME pull_nttime(uint8_t *base, uint16_t offset) /** return (tv1 - tv2) in microseconds */ -_PUBLIC_ int64_t usec_time_diff(struct timeval *tv1, struct timeval *tv2) +_PUBLIC_ int64_t usec_time_diff(const struct timeval *tv1, const struct timeval *tv2) { int64_t sec_diff = tv1->tv_sec - tv2->tv_sec; return (sec_diff * 1000000) + (int64_t)(tv1->tv_usec - tv2->tv_usec); diff --git a/source4/lib/util/time.h b/source4/lib/util/time.h index 1ab976ca78..e4008c5782 100644 --- a/source4/lib/util/time.h +++ b/source4/lib/util/time.h @@ -127,7 +127,7 @@ _PUBLIC_ NTTIME nttime_from_string(const char *s); /** return (tv1 - tv2) in microseconds */ -_PUBLIC_ int64_t usec_time_diff(struct timeval *tv1, struct timeval *tv2); +_PUBLIC_ int64_t usec_time_diff(const struct timeval *tv1, const struct timeval *tv2); /** return a zero timeval |