forked from node-inspector/v8-profiler
-
Notifications
You must be signed in to change notification settings - Fork 5
/
cpu_profiler.h
31 lines (24 loc) · 919 Bytes
/
cpu_profiler.h
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
#ifndef NODE_CPU_PROFILER_
#define NODE_CPU_PROFILER_
#include <v8-profiler.h>
#include <node.h>
using namespace v8;
using namespace node;
namespace nodex {
class CpuProfiler {
public:
static void Initialize(Handle<Object> target);
CpuProfiler();
virtual ~CpuProfiler();
protected:
static Handle<Value> GetProfilesCount(const Arguments& args);
static Handle<Value> GetProfile(const Arguments& args);
static Handle<Value> FindProfile(const Arguments& args);
static Handle<Value> StartProfiling(const Arguments& args);
static Handle<Value> StopProfiling(const Arguments& args);
static Handle<Value> DeleteAllProfiles(const Arguments& args);
private:
static Persistent<ObjectTemplate> cpu_profiler_template_;
};
} //namespace nodex
#endif // NODE_CPU_PROFILER_H