From e11bdf1935bc5a46db790ef414110149009f8c6a Mon Sep 17 00:00:00 2001 From: "jorlow@chromium.org" Date: Fri, 25 Mar 2011 20:27:43 +0000 Subject: Upstream changes git-svn-id: https://leveldb.googlecode.com/svn/trunk@15 62dab493-f737-651d-591e-8d6aee1b9529 --- port/sha1_test.cc | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'port') diff --git a/port/sha1_test.cc b/port/sha1_test.cc index 46bbeba..b182e67 100644 --- a/port/sha1_test.cc +++ b/port/sha1_test.cc @@ -31,22 +31,6 @@ TEST(SHA1, Simple) { TestSHA1(x.data(), x.size())); } -TEST(SHA1, Benchmark) { - std::string data(1048576 * 100, 'x'); - double start = Env::Default()->NowMicros() * 1e-6; - static const int kIters = 10; - uint32_t sha1 = 0; - for (int i = 0; i < kIters; i++) { - char hash_val[20]; - SHA1_Hash(data.data(), data.size(), hash_val); - sha1 |= hash_val[0]; - } - double finish = Env::Default()->NowMicros() * 1e-6; - double mb = (static_cast(data.size()) * kIters) / 1048576.0; - fprintf(stderr, "SHA1 %0.0f MB: %.3f secs; %.1f MB/s, dummy=0x%02x\n", - mb, (finish - start), mb / (finish - start), sha1); -} - } } -- cgit v1.2.1