]> git.tdb.fi Git - libs/core.git/blobdiff - source/debug/profiler.h
Refactor Profiler
[libs/core.git] / source / debug / profiler.h
index 3ebefa05b63877b979b4ace905e149d4b95ba1e1..5ec8f3f1fcafa5dae8ebe4508a5b02abaeb7e1f3 100644 (file)
@@ -4,7 +4,7 @@
 #include <map>
 #include <string>
 #include <vector>
-#include "../time/timedelta.h"
+#include <msp/time/timedelta.h>
 
 namespace Msp {
 namespace Debug {
@@ -65,21 +65,14 @@ public:
        */
        ProfilingScope *enter(ProfilingScope *ps);
 
-       /**
-       Records a call to a scope.  You'll probably want to use a ProfilingScope
-       instead of calling this manually.
-
-       @param  sn  Scope name
-       @param  pn  Parent scope name
-       @param  t   Time spent in the scope
-       @param  ct  Time spent in child scopes
-       */
-       void record(const std::string &sn, const std::string &pn, const Time::TimeDelta &t, const Time::TimeDelta &ct);
+       /** Records the data from a ProfilingScope.  It is not useful to call this
+       manually. */
+       void record(const ProfilingScope &);
 
        /**
        Returns informations about a scope.
        */
-       const ScopeInfo &scope(const std::string &) const;
+       const ScopeInfo &get_scope(const std::string &) const;
 };
 
 } // namespace Debug