Node.js  v8.x
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine
node::performance Namespace Reference

Data Structures

struct  performance_state
 

Enumerations

enum  PerformanceMilestone { NODE_PERFORMANCE_MILESTONE_INVALID }
 
enum  PerformanceEntryType { NODE_PERFORMANCE_ENTRY_TYPE_INVALID }
 

Functions

void Mark (const FunctionCallbackInfo< Value > &args)
 
uint64_t GetPerformanceMark (Environment *env, std::string name)
 
void Measure (const FunctionCallbackInfo< Value > &args)
 
void GetPerformanceEntryName (const Local< String > prop, const PropertyCallbackInfo< Value > &info)
 
void GetPerformanceEntryType (const Local< String > prop, const PropertyCallbackInfo< Value > &info)
 
void GetPerformanceEntryStartTime (const Local< String > prop, const PropertyCallbackInfo< Value > &info)
 
void GetPerformanceEntryDuration (const Local< String > prop, const PropertyCallbackInfo< Value > &info)
 
void MarkMilestone (const FunctionCallbackInfo< Value > &args)
 
void SetupPerformanceObservers (const FunctionCallbackInfo< Value > &args)
 
void PerformanceGCCallback (uv_async_t *handle)
 
void MarkGarbageCollectionStart (Isolate *isolate, v8::GCType type, v8::GCCallbackFlags flags)
 
void MarkGarbageCollectionEnd (Isolate *isolate, v8::GCType type, v8::GCCallbackFlags flags)
 
void SetupGarbageCollectionTracking (Isolate *isolate)
 
Local< Value > GetName (Local< Function > fn)
 
void TimerFunctionCall (const FunctionCallbackInfo< Value > &args)
 
void Timerify (const FunctionCallbackInfo< Value > &args)
 
void Init (Local< Object > target, Local< Value > unused, Local< Context > context)
 

Variables

const uint64_t timeOrigin = PERFORMANCE_NOW()
 
uint64_t performance_node_start
 
uint64_t performance_v8_start
 
uint64_t performance_last_gc_start_mark_ = 0
 
v8::GCType performance_last_gc_type_ = v8::GCType::kGCTypeAll
 

Enumeration Type Documentation

◆ PerformanceEntryType

Enumerator
NODE_PERFORMANCE_ENTRY_TYPE_INVALID 

Definition at line 50 of file node_perf_common.h.

◆ PerformanceMilestone

Enumerator
NODE_PERFORMANCE_MILESTONE_INVALID 

Definition at line 43 of file node_perf_common.h.

Function Documentation

◆ GetName()

Local<Value> node::performance::GetName ( Local< Function >  fn)
inline

Definition at line 230 of file node_perf.cc.

Referenced by TimerFunctionCall().

◆ GetPerformanceEntryDuration()

void node::performance::GetPerformanceEntryDuration ( const Local< String >  prop,
const PropertyCallbackInfo< Value > &  info 
)

Definition at line 152 of file node_perf.cc.

Referenced by Init().

◆ GetPerformanceEntryName()

void node::performance::GetPerformanceEntryName ( const Local< String >  prop,
const PropertyCallbackInfo< Value > &  info 
)

Definition at line 127 of file node_perf.cc.

Referenced by Init().

◆ GetPerformanceEntryStartTime()

void node::performance::GetPerformanceEntryStartTime ( const Local< String >  prop,
const PropertyCallbackInfo< Value > &  info 
)

Definition at line 145 of file node_perf.cc.

Referenced by Init().

◆ GetPerformanceEntryType()

void node::performance::GetPerformanceEntryType ( const Local< String >  prop,
const PropertyCallbackInfo< Value > &  info 
)

Definition at line 136 of file node_perf.cc.

Referenced by Init().

◆ GetPerformanceMark()

uint64_t node::performance::GetPerformanceMark ( Environment *  env,
std::string  name 
)
inline

Definition at line 81 of file node_perf.cc.

Referenced by Measure().

◆ Init()

◆ Mark()

void node::performance::Mark ( const FunctionCallbackInfo< Value > &  args)

Definition at line 63 of file node_perf.cc.

References PERFORMANCE_NOW.

Referenced by Init().

◆ MarkGarbageCollectionEnd()

void node::performance::MarkGarbageCollectionEnd ( Isolate *  isolate,
v8::GCType  type,
v8::GCCallbackFlags  flags 
)
inline

◆ MarkGarbageCollectionStart()

void node::performance::MarkGarbageCollectionStart ( Isolate *  isolate,
v8::GCType  type,
v8::GCCallbackFlags  flags 
)
inline

Definition at line 206 of file node_perf.cc.

References PERFORMANCE_NOW.

Referenced by SetupGarbageCollectionTracking().

◆ MarkMilestone()

void node::performance::MarkMilestone ( const FunctionCallbackInfo< Value > &  args)

Definition at line 159 of file node_perf.cc.

References NODE_PERFORMANCE_MILESTONE_INVALID, and PERFORMANCE_NOW.

Referenced by Init().

◆ Measure()

void node::performance::Measure ( const FunctionCallbackInfo< Value > &  args)

Definition at line 87 of file node_perf.cc.

References GetPerformanceMark(), NODE_PERFORMANCE_MILESTONE_INVALID, and timeOrigin.

Referenced by Init().

◆ PerformanceGCCallback()

void node::performance::PerformanceGCCallback ( uv_async_t *  handle)
inline

Definition at line 177 of file node_perf.cc.

References node::Buffer::Data(), data, and node::Buffer::New().

Referenced by MarkGarbageCollectionEnd().

◆ SetupGarbageCollectionTracking()

void node::performance::SetupGarbageCollectionTracking ( Isolate *  isolate)
inline

Definition at line 225 of file node_perf.cc.

References MarkGarbageCollectionEnd(), and MarkGarbageCollectionStart().

Referenced by Init().

◆ SetupPerformanceObservers()

void node::performance::SetupPerformanceObservers ( const FunctionCallbackInfo< Value > &  args)

Definition at line 171 of file node_perf.cc.

Referenced by Init().

◆ TimerFunctionCall()

void node::performance::TimerFunctionCall ( const FunctionCallbackInfo< Value > &  args)

Definition at line 241 of file node_perf.cc.

References GetName(), and PERFORMANCE_NOW.

Referenced by Timerify().

◆ Timerify()

void node::performance::Timerify ( const FunctionCallbackInfo< Value > &  args)

Definition at line 298 of file node_perf.cc.

References node::Buffer::New(), TimerFunctionCall(), and wrap.

Referenced by Init().

Variable Documentation

◆ performance_last_gc_start_mark_

uint64_t performance_last_gc_start_mark_ = 0

Definition at line 34 of file node_perf.cc.

◆ performance_last_gc_type_

v8::GCType performance_last_gc_type_ = v8::GCType::kGCTypeAll

Definition at line 35 of file node_perf.cc.

◆ performance_node_start

uint64_t performance_node_start

Definition at line 31 of file node_perf.cc.

Referenced by node::Start().

◆ performance_v8_start

uint64_t performance_v8_start

Definition at line 32 of file node_perf.cc.

◆ timeOrigin

const uint64_t timeOrigin = PERFORMANCE_NOW()

Definition at line 30 of file node_perf.cc.

Referenced by Measure().