mirror of
https://github.com/nodejs/node.git
synced 2025-05-04 23:42:17 +00:00

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>
25 lines
843 B
JavaScript
25 lines
843 B
JavaScript
// Flags: --expose-internals
|
|
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
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
|
|
} = require('internal/dtrace');
|
|
|
|
// We're just testing to make sure these are always defined and
|
|
// callable. We don't actually test their function here.
|
|
|
|
assert.strictEqual(typeof DTRACE_HTTP_CLIENT_REQUEST, 'function');
|
|
assert.strictEqual(typeof DTRACE_HTTP_CLIENT_RESPONSE, 'function');
|
|
assert.strictEqual(typeof DTRACE_HTTP_SERVER_REQUEST, 'function');
|
|
assert.strictEqual(typeof DTRACE_HTTP_SERVER_RESPONSE, 'function');
|
|
assert.strictEqual(typeof DTRACE_NET_SERVER_CONNECTION, 'function');
|
|
assert.strictEqual(typeof DTRACE_NET_STREAM_END, 'function');
|