mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
f9ddbb6b2f
The DTRACE_* probes have been global for no really good reason. Move those into an internalBinding. PR-URL: https://github.com/nodejs/node/pull/26541 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
22 lines
568 B
JavaScript
22 lines
568 B
JavaScript
'use strict';
|
|
|
|
const config = internalBinding('config');
|
|
|
|
const {
|
|
DTRACE_HTTP_CLIENT_REQUEST = () => {},
|
|
DTRACE_HTTP_CLIENT_RESPONSE = () => {},
|
|
DTRACE_HTTP_SERVER_REQUEST = () => {},
|
|
DTRACE_HTTP_SERVER_RESPONSE = () => {},
|
|
DTRACE_NET_SERVER_CONNECTION = () => {},
|
|
DTRACE_NET_STREAM_END = () => {}
|
|
} = (config.hasDtrace ? internalBinding('dtrace') : {});
|
|
|
|
module.exports = {
|
|
DTRACE_HTTP_CLIENT_REQUEST,
|
|
DTRACE_HTTP_CLIENT_RESPONSE,
|
|
DTRACE_HTTP_SERVER_REQUEST,
|
|
DTRACE_HTTP_SERVER_RESPONSE,
|
|
DTRACE_NET_SERVER_CONNECTION,
|
|
DTRACE_NET_STREAM_END
|
|
};
|