MCPcopy Create free account
hub / github.com/X-Profiler/xprofiler / SetHttpConfig

Function SetHttpConfig

src/jsapi/export_http.cc:14–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12constexpr char module_type[] = "http";
13
14void SetHttpConfig(const FunctionCallbackInfo<Value>& info) {
15 EnvironmentData* env_data = EnvironmentData::GetCurrent(info);
16 if (!env_data) {
17 return;
18 }
19 HttpStatistics* http_statistics = env_data->http_statistics();
20
21 v8::Isolate* isolate = info.GetIsolate();
22 HandleScope scope(isolate);
23
24 if (!info[0]->IsObject()) {
25 Nan::ThrowTypeError("Argument should be an object");
26 return;
27 }
28
29 v8::Local<v8::Object> config = Nan::To<v8::Object>(info[0]).ToLocalChecked();
30
31 // init
32 http_statistics->config.Reset(config);
33 http_statistics->config_initialized = true;
34}
35
36void AddLiveRequest(const FunctionCallbackInfo<Value>& info) {
37 EnvironmentData* env_data = EnvironmentData::GetCurrent(info);

Callers

nothing calls this directly

Calls 1

http_statisticsMethod · 0.80

Tested by

no test coverage detected