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

Unified Diff: base/test/trace_event_analyzer.h

Issue 8678035: Add TraceAnalyzer support for calculating common event rate statistics (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | base/test/trace_event_analyzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/trace_event_analyzer.h
diff --git a/base/test/trace_event_analyzer.h b/base/test/trace_event_analyzer.h
index d41cff2ec0bc1ce1c34184a5ddcb7758bc98e7ab..b81b8ed3d049de757c99082ca3aa19257190ce44 100644
--- a/base/test/trace_event_analyzer.h
+++ b/base/test/trace_event_analyzer.h
@@ -411,6 +411,13 @@ class TraceAnalyzer {
public:
typedef std::vector<const TraceEvent*> TraceEventVector;
+ struct Stats {
+ double min_us;
+ double max_us;
+ double mean_us;
+ double standard_deviation_us;
+ };
+
~TraceAnalyzer();
// Use trace events from JSON string generated by tracing API.
@@ -461,6 +468,10 @@ class TraceAnalyzer {
const std::string& GetThreadName(const TraceEvent::ProcessThreadID& thread);
+ // Calculate min/max/mean and standard deviation from the times between
+ // adjacent events.
+ static bool GetRateStats(const TraceEventVector& events, Stats* stats);
+
private:
TraceAnalyzer();
« no previous file with comments | « no previous file | base/test/trace_event_analyzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698