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

Unified Diff: net/disk_cache/simple/simple_synchronous_entry.cc

Issue 1980523002: **NOTFORLANDING** Example slowdown for disk cache stress test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@open-speeder-3
Patch Set: 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/simple/simple_synchronous_entry.cc
diff --git a/net/disk_cache/simple/simple_synchronous_entry.cc b/net/disk_cache/simple/simple_synchronous_entry.cc
index 864c05ac8ac7263cb69726376b0c4827f8b96004..e929b0657b599e27cd9c65f00578a78aaa48ee13 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.cc
+++ b/net/disk_cache/simple/simple_synchronous_entry.cc
@@ -9,6 +9,7 @@
#include <functional>
#include <limits>
+#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/files/file_util.h"
#include "base/hash.h"
@@ -25,6 +26,8 @@
#include "net/disk_cache/simple/simple_util.h"
#include "third_party/zlib/zlib.h"
+#include <unistd.h>
+
using base::File;
using base::FilePath;
using base::Time;
@@ -266,6 +269,10 @@ void SimpleSynchronousEntry::CreateEntry(
return;
}
out_results->sync_entry = sync_entry;
+ if (base::CommandLine::ForCurrentProcess()-> HasSwitch(
+ "simple-cache-slower-creates")) {
+ usleep(20 * 1000);
+ }
}
// static
« 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