Node.js  v8.x
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine
node_perf.cc File Reference
#include "node.h"
#include "v8.h"
#include "env.h"
#include "env-inl.h"
#include "node_perf.h"
#include "uv.h"
#include <vector>
Include dependency graph for node_perf.cc:

Go to the source code of this file.

Namespaces

 node
 
 node::performance
 

Macros

#define SET_STATE_TYPEDARRAY(name, type, field)
 
#define V(name, _)   NODE_DEFINE_HIDDEN_CONSTANT(constants, NODE_PERFORMANCE_ENTRY_TYPE_##name);
 
#define V(name, _)   NODE_DEFINE_HIDDEN_CONSTANT(constants, NODE_PERFORMANCE_MILESTONE_##name);
 

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
 

Macro Definition Documentation

◆ SET_STATE_TYPEDARRAY

#define SET_STATE_TYPEDARRAY (   name,
  type,
  field 
)
Value:
target->Set(context, \
FIXED_ONE_BYTE_STRING(isolate, (name)), \
type::New(state_ab, \
offsetof(performance_state, field), \
arraysize(state->field))) \
.FromJust()
MaybeLocal< Object > New(Isolate *isolate, Local< String > string, enum encoding enc)
Definition: node_buffer.cc:241

Referenced by node::performance::Init().

◆ V [1/2]

#define V (   name,
 
)    NODE_DEFINE_HIDDEN_CONSTANT(constants, NODE_PERFORMANCE_ENTRY_TYPE_##name);

Referenced by node::performance::Init().

◆ V [2/2]

#define V (   name,
 
)    NODE_DEFINE_HIDDEN_CONSTANT(constants, NODE_PERFORMANCE_MILESTONE_##name);