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

Unified Diff: content/browser/hyphenation/hyphenation_impl.cc

Issue 2340613002: Add UMA to measure time to open hyphenation dictionary (Closed)
Patch Set: Rebase Created 4 years, 3 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 | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/hyphenation/hyphenation_impl.cc
diff --git a/content/browser/hyphenation/hyphenation_impl.cc b/content/browser/hyphenation/hyphenation_impl.cc
index f22a896c3239be48799b0b90a169d0605f44d926..5e6c3cda728f8b5f5b9da758e2edb8ea1be91808 100644
--- a/content/browser/hyphenation/hyphenation_impl.cc
+++ b/content/browser/hyphenation/hyphenation_impl.cc
@@ -10,8 +10,10 @@
#include "base/files/file.h"
#include "base/files/file_path.h"
+#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "base/timer/elapsed_timer.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "mojo/public/cpp/system/platform_handle.h"
@@ -43,7 +45,9 @@ static base::File& GetDictionaryFile(const std::string& locale) {
#endif
std::string filename = base::StringPrintf("hyph-%s.hyb", locale.c_str());
base::FilePath path = dir.AppendASCII(filename);
+ base::ElapsedTimer timer;
file.Initialize(path, base::File::FLAG_OPEN | base::File::FLAG_READ);
+ UMA_HISTOGRAM_TIMES("Hyphenation.Open.File", timer.Elapsed());
return file;
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698