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

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: Further address Etienne's comments. 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
« no previous file with comments | « apps/benchmark/benchmark_app.cc ('k') | apps/benchmark/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/benchmark/event.h
diff --git a/apps/benchmark/event.h b/apps/benchmark/event.h
new file mode 100644
index 0000000000000000000000000000000000000000..14060accfba6787fa002fea1caf7d4f9ba357356
--- /dev/null
+++ b/apps/benchmark/event.h
@@ -0,0 +1,36 @@
+// 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 <string>
+#include <vector>
+
+#include "base/time/time.h"
+#include "base/values.h"
+
+namespace benchmark {
+
+// Represents a single trace event.
+struct Event {
+ std::string name;
+ std::string category;
+ base::TimeTicks timestamp;
+ base::TimeDelta duration;
+
+ Event();
+ Event(std::string name,
+ std::string category,
+ base::TimeTicks timestamp,
+ base::TimeDelta duration);
+ ~Event();
+};
+
+// Parses a JSON string representing a list of trace events. Stores the outcome
+// in |result| and returns true on success. Returns false on error.
+bool GetEvents(const std::string& trace_json, std::vector<Event>* result);
+
+} // namespace benchmark
+#endif // APPS_BENCHMARK_EVENT_H_
« no previous file with comments | « apps/benchmark/benchmark_app.cc ('k') | apps/benchmark/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698