Debian Codegraph @

src/atlas/runtime/trace/Timings.h

raw
1 /*
2 * (C) Copyright 2013 ECMWF.
3 *
4 * This software is licensed under the terms of the Apache Licence Version 2.0
5 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6 * In applying this licence, ECMWF does not waive the privileges and immunities
7 * granted to it by virtue of its status as an intergovernmental organisation
8 * nor does it submit to any jurisdiction.
9 */
10
11 #pragma once
12
13 #include <string>
14 #include <vector>
15
16 //-----------------------------------------------------------------------------------------------------------
17
18 namespace eckit {
19 class Configuration;
20 }
21 namespace atlas {
22 class CodeLocation;
23 }
24
25 namespace atlas {
26 namespace runtime {
27 namespace trace {
28
29 class CallStack;
30
31 class Timings {
32 public:
33 using Configuration = eckit::Configuration;
34 using CodeLocation = atlas::CodeLocation;
35 using Identifier = size_t;
36 using Labels = std::vector<std::string>;
37
38 public: // static methods
39 static Identifier add(const CodeLocation&, const CallStack&, const std::string& title, const Labels&);
40
41 static void update(const Identifier& id, double seconds);
42
43 static std::string report();
44
45 static std::string report(const Configuration&);
46 };
47
48 } // namespace trace
49 } // namespace runtime
50 } // namespace atlas