-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
Expand file tree
/
Copy pathagent.h
More file actions
33 lines (24 loc) · 694 Bytes
/
agent.h
File metadata and controls
33 lines (24 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef SRC_TRACING_AGENT_H_
#define SRC_TRACING_AGENT_H_
#include "libplatform/v8-tracing.h"
#include "uv.h"
#include "v8.h"
namespace node {
namespace tracing {
using v8::platform::tracing::TracingController;
class Agent {
public:
explicit Agent(const std::string& log_file_pattern);
void Start(const std::string& enabled_categories);
void Stop();
TracingController* GetTracingController() { return tracing_controller_; }
private:
static void ThreadCb(void* arg);
uv_thread_t thread_;
uv_loop_t tracing_loop_;
bool started_ = false;
TracingController* tracing_controller_ = nullptr;
};
} // namespace tracing
} // namespace node
#endif // SRC_TRACING_AGENT_H_