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 f85910550ee2e3836d01e07d0df001b1d2c9928b..9c108dac9239d515c6fa7a5db1f4b1a91e5a1092 100644 |
--- a/net/disk_cache/simple/simple_synchronous_entry.cc |
+++ b/net/disk_cache/simple/simple_synchronous_entry.cc |
@@ -14,9 +14,11 @@ |
#include "base/files/file_util.h" |
#include "base/hash.h" |
#include "base/location.h" |
+#include "base/metrics/histogram.h" |
#include "base/numerics/safe_conversions.h" |
#include "base/sha1.h" |
#include "base/strings/stringprintf.h" |
+#include "base/time/time.h" |
#include "net/base/io_buffer.h" |
#include "net/base/net_errors.h" |
#include "net/disk_cache/simple/simple_backend_version.h" |
@@ -216,6 +218,7 @@ void SimpleSynchronousEntry::OpenEntry( |
const uint64 entry_hash, |
bool had_index, |
SimpleEntryCreationResults *out_results) { |
+ base::Time open_start_time(base::Time::Now()); |
Deprecated (see juliatuttle)
2015/05/13 20:21:38
Perhaps use TimeTicks? I am under the impression i
Randy Smith (Not in Mondays)
2015/05/13 20:32:52
Oh, good point. I haven't done this in too long,
|
SimpleSynchronousEntry* sync_entry = |
new SimpleSynchronousEntry(cache_type, path, "", entry_hash); |
out_results->result = |
@@ -230,6 +233,8 @@ void SimpleSynchronousEntry::OpenEntry( |
out_results->stream_0_data = NULL; |
return; |
} |
+ UMA_HISTOGRAM_TIMES("SimpleCache.DiskOpenLatency", |
Deprecated (see juliatuttle)
2015/05/13 20:21:38
This looks good as long as you only care about ope
Randy Smith (Not in Mondays)
2015/05/13 20:32:52
So Bryan and I chatted, and decided we'd be mostly
|
+ base::Time::Now() - open_start_time); |
out_results->sync_entry = sync_entry; |
} |