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

Unified Diff: components/subresource_filter/core/browser/ruleset_service.cc

Issue 2503283003: Add high-precision timing histograms. (Closed)
Patch Set: Change measurement unit. Created 4 years 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
Index: components/subresource_filter/core/browser/ruleset_service.cc
diff --git a/components/subresource_filter/core/browser/ruleset_service.cc b/components/subresource_filter/core/browser/ruleset_service.cc
index 3a0c5fcb3a4b2992e3bf3e8efc2b06a4231e9f00..031a1f08dc57113965f325c2f19dc3e631583062 100644
--- a/components/subresource_filter/core/browser/ruleset_service.cc
+++ b/components/subresource_filter/core/browser/ruleset_service.cc
@@ -28,6 +28,7 @@
#include "components/subresource_filter/core/common/copying_file_stream.h"
#include "components/subresource_filter/core/common/indexed_ruleset.h"
#include "components/subresource_filter/core/common/proto/rules.pb.h"
+#include "components/subresource_filter/core/common/scoped_timers.h"
#include "components/subresource_filter/core/common/unindexed_ruleset.h"
#include "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h"
@@ -344,6 +345,8 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
bool RulesetService::IndexRuleset(base::File unindexed_ruleset_file,
RulesetIndexer* indexer) {
SCOPED_UMA_HISTOGRAM_TIMER("SubresourceFilter.IndexRuleset.WallDuration");
+ SCOPED_UMA_HISTOGRAM_THREAD_TIMER(
+ "SubresourceFilter.IndexRuleset.CPUDuration");
int64_t unindexed_ruleset_size = unindexed_ruleset_file.GetLength();
CopyingFileInputStream copying_stream(std::move(unindexed_ruleset_file));

Powered by Google App Engine
This is Rietveld 408576698