summaryrefslogtreecommitdiff
path: root/node.gyp
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2019-01-07 11:36:35 -0800
committerjasnell <jasnell@gmail.com>2019-02-08 09:20:18 -0800
commitbcdd228f90b3e9e428b584814e7d52627616456a (patch)
treeeed1b405a1fd7e2f78bbf10e82d65c57d2c29105 /node.gyp
parent679c23f2ae1e62443f8d90e653824007ce174139 (diff)
downloadandroid-node-v8-bcdd228f90b3e9e428b584814e7d52627616456a.tar.gz
android-node-v8-bcdd228f90b3e9e428b584814e7d52627616456a.tar.bz2
android-node-v8-bcdd228f90b3e9e428b584814e7d52627616456a.zip
perf_hooks: implement histogram based api
Add a sampling-based event loop delay monitor. ```js const { monitorEventLoopDelay } = require('perf_hooks'); const h = monitorEventLoopDelay(); h.enable(); h.disable(); console.log(h.percentiles); console.log(h.min); console.log(h.max); console.log(h.mean); console.log(h.stddev); console.log(h.percentile(50)); ``` PR-URL: https://github.com/nodejs/node/pull/25378 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'node.gyp')
-rw-r--r--node.gyp7
1 files changed, 6 insertions, 1 deletions
diff --git a/node.gyp b/node.gyp
index 4b3318e8af..1cbc8822cc 100644
--- a/node.gyp
+++ b/node.gyp
@@ -261,8 +261,9 @@
],
'include_dirs': [
'src',
- 'deps/v8/include',
+ 'deps/v8/include'
],
+ 'dependencies': [ 'deps/histogram/histogram.gyp:histogram' ],
# - "C4244: conversion from 'type1' to 'type2', possible loss of data"
# Ususaly safe. Disable for `dep`, enable for `src`
@@ -360,6 +361,7 @@
'src',
'<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
],
+ 'dependencies': [ 'deps/histogram/histogram.gyp:histogram' ],
'sources': [
'src/api/callback.cc',
@@ -458,6 +460,8 @@
'src/env.h',
'src/env-inl.h',
'src/handle_wrap.h',
+ 'src/histogram.h',
+ 'src/histogram-inl.h',
'src/http_parser_adaptor.h',
'src/js_stream.h',
'src/memory_tracker.h',
@@ -966,6 +970,7 @@
'<(node_lib_target_name)',
'rename_node_bin_win',
'deps/gtest/gtest.gyp:gtest',
+ 'deps/histogram/histogram.gyp:histogram',
'node_dtrace_header',
'node_dtrace_ustack',
'node_dtrace_provider',