Chromium Code Reviews| Index: apps/benchmark/event.h |
| diff --git a/apps/benchmark/event.h b/apps/benchmark/event.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..293c84ee6b09317ac46bb96449a21a9b31c4d9e8 |
| --- /dev/null |
| +++ b/apps/benchmark/event.h |
| @@ -0,0 +1,35 @@ |
| +// 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 { |
| + |
| +struct Event { |
|
etiennej
2015/08/28 13:54:37
Documentation?
ppi
2015/08/28 14:02:06
Done. Plmk if you think more is needed.
|
| + 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_ |