Skip to content

Commit

Permalink
diagnostics_channel: built-in channels should remain experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
Qard committed Nov 14, 2022
1 parent 916af4e commit 361b728
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/api/diagnostics_channel.md
Expand Up @@ -409,6 +409,12 @@ channel.unsubscribe(onMessage);

### Built-in Channels

> Stability: 1 - Experimental
While the diagnostics_channel API is now considered stable, the built-in
channels currently available are not. Each channel must be declared stable
independently.

#### HTTP

`http.client.request.start`
Expand Down
11 changes: 11 additions & 0 deletions src/node_contextify.cc
Expand Up @@ -1407,6 +1407,17 @@ void Initialize(Local<Object> target,

READONLY_PROPERTY(constants, "measureMemory", measure_memory);

Local<Object> loop_mode = Object::New(env->isolate());
{
uv_run_mode DEFAULT = UV_RUN_DEFAULT;
uv_run_mode ONCE = UV_RUN_ONCE;
uv_run_mode NOWAIT = UV_RUN_NOWAIT;
NODE_DEFINE_CONSTANT(loop_mode, DEFAULT);
NODE_DEFINE_CONSTANT(loop_mode, ONCE);
NODE_DEFINE_CONSTANT(loop_mode, NOWAIT);
READONLY_PROPERTY(constants, "loopMode", loop_mode);
}

target->Set(context, env->constants_string(), constants).Check();

SetMethod(context, target, "measureMemory", MeasureMemory);
Expand Down

0 comments on commit 361b728

Please sign in to comment.