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

Unified Diff: apps/benchmark/event.h

Issue 1305193002: Trace-based benchmarking via a mojo app. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 4 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
Index: apps/benchmark/event.h
diff --git a/apps/benchmark/event.h b/apps/benchmark/event.h
new file mode 100644
index 0000000000000000000000000000000000000000..d254d5ba59c885c89117a9575096e27cbd0a62dc
--- /dev/null
+++ b/apps/benchmark/event.h
@@ -0,0 +1,32 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef APPS_BENCHMARK_EVENT_H_
+#define APPS_BENCHMARK_EVENT_H_
+
+#include <vector>
+
+#include "base/memory/scoped_ptr.h"
+#include "base/time/time.h"
+#include "base/values.h"
+
+namespace benchmark {
+
+struct Event {
+ std::string name;
+ std::string category;
+ base::TimeDelta duration;
+ base::TimeTicks timestamp;
+
+ Event();
+ ~Event();
+};
+
+// Walks the JSON tree representing the collected trace events and produces a
+// representation as a list of Events. Stores the outcome in |result| and
+// returns true on success. Returns false on error.
+bool GetEvents(scoped_ptr<base::Value> trace_data, std::vector<Event>* result);
+
+} // namespace benchmark
+#endif // APPS_BENCHMARK_EVENT_H_

Powered by Google App Engine
This is Rietveld 408576698