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

Unified Diff: net/quic/crypto/proof_verifier_chromium.cc

Issue 1543763003: QUIC - added histograms to measure time for proof verification. This is (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« 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: net/quic/crypto/proof_verifier_chromium.cc
diff --git a/net/quic/crypto/proof_verifier_chromium.cc b/net/quic/crypto/proof_verifier_chromium.cc
index 03951d9103b3bf30acd94cb6a6ce36aaced9e334..fa8b8c5d9f02ed162dd616a3fb9922304733946d 100644
--- a/net/quic/crypto/proof_verifier_chromium.cc
+++ b/net/quic/crypto/proof_verifier_chromium.cc
@@ -55,6 +55,7 @@ class ProofVerifierChromium::Job {
CTVerifier* cert_transparency_verifier,
int cert_verify_flags,
const BoundNetLog& net_log);
+ ~Job();
// Starts the proof verification. If |QUIC_PENDING| is returned, then
// |callback| will be invoked asynchronously when the verification completes.
@@ -112,6 +113,8 @@ class ProofVerifierChromium::Job {
State next_state_;
+ base::TimeTicks start_time_;
+
BoundNetLog net_log_;
DISALLOW_COPY_AND_ASSIGN(Job);
@@ -132,8 +135,20 @@ ProofVerifierChromium::Job::Job(
cert_transparency_verifier_(cert_transparency_verifier),
cert_verify_flags_(cert_verify_flags),
next_state_(STATE_NONE),
+ start_time_(base::TimeTicks::Now()),
net_log_(net_log) {}
+ProofVerifierChromium::Job::~Job() {
+ base::TimeTicks end_time = base::TimeTicks::Now();
+ UMA_HISTOGRAM_TIMES("Net.QuicSession.VerifyProofTime",
+ end_time - start_time_);
+ // |hostname_| will always be canonicalized to lowercase.
+ if (hostname_.compare("www.google.com") == 0) {
+ UMA_HISTOGRAM_TIMES("Net.QuicSession.VerifyProofTime.google",
+ end_time - start_time_);
+ }
+}
+
QuicAsyncStatus ProofVerifierChromium::Job::VerifyProof(
const string& hostname,
const string& server_config,
« 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