Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1185)

Unified Diff: net/disk_cache/disk_cache_perftest.cc

Issue 1988833004: Better defaults for the disk cache perftest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@open-speeder-macbetter
Patch Set: spacing Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/disk_cache_perftest.cc
diff --git a/net/disk_cache/disk_cache_perftest.cc b/net/disk_cache/disk_cache_perftest.cc
index 959143b884d7bc09249113c59dfc364937614313..759515a5f4ddbf7df7246634672629f639a93b64 100644
--- a/net/disk_cache/disk_cache_perftest.cc
+++ b/net/disk_cache/disk_cache_perftest.cc
@@ -79,8 +79,8 @@ class DiskCachePerfTest : public DiskCacheTestWithCache {
const size_t kFdLimitForCacheTests = 8192;
const int kNumEntries = 1000;
- const int kHeadersSize = 200;
- const int kBodySize = 16 * 1024 - 1;
+ const int kHeadersSize = 800;
+ const int kBodySize = 256 * 1024 - 1;
std::vector<TestEntry> entries_;
@@ -88,9 +88,14 @@ class DiskCachePerfTest : public DiskCacheTestWithCache {
const size_t saved_fd_limit_;
};
-// Creates num_entries on the cache, and writes 200 bytes of metadata and up
-// to kBodySize of data to each entry.
+// Creates num_entries on the cache, and writes kHeaderSize bytes of metadata
+// and up to kBodySize of data to each entry.
bool DiskCachePerfTest::TimeWrite() {
+ // TODO(gavinp): This test would be significantly more realistic if it didn't
+ // do single reads and writes. Perhaps entries should be written 64kb at a
+ // time. As well, not all entries should be created and written essentially
+ // simultaneously; some number of entries in flight at a time would be a
+ // likely better testing load.
scoped_refptr<net::IOBuffer> buffer1(new net::IOBuffer(kHeadersSize));
scoped_refptr<net::IOBuffer> buffer2(new net::IOBuffer(kBodySize));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698