Skip to content

Commit bf3a07c

Browse files
committed
src: set name to nsolid threads
Fixes: #197 PR-URL: #401 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent 4da827c commit bf3a07c

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

agents/grpc/src/grpc_agent.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,7 @@ int GrpcAgent::start_heap_snapshot_from_js(
701701
return;
702702
}
703703

704+
USE(uv_thread_setname("NSolidGrpcAgent"));
704705
agent->do_start();
705706
do {
706707
ASSERT_EQ(0, uv_run(&agent->loop_, UV_RUN_DEFAULT));

agents/otlp/src/otlp_agent.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ int OTLPAgent::config(const nlohmann::json& config) {
241241

242242

243243
/*static*/ void OTLPAgent::run_(nsuv::ns_thread*, OTLPAgent* agent) {
244+
USE(uv_thread_setname("NSolidOTLPAgent"));
244245
agent->do_start();
245246
do {
246247
ASSERT_EQ(0, uv_run(&agent->loop_, UV_RUN_DEFAULT));

agents/statsd/src/statsd_agent.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ void StatsDAgent::do_stop() {
580580
}
581581

582582
void StatsDAgent::run_(nsuv::ns_thread*, WeakStatsDAgent agent_wp) {
583+
USE(uv_thread_setname("NSolidStatsDAgent"));
583584
SharedStatsDAgent agent = agent_wp.lock();
584585
if (agent == nullptr) {
585586
return;

agents/zmq/src/zmq_agent.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,7 @@ const string_vector ZmqAgent::metrics_fields = {"/interval",
809809
"/pauseMetrics"};
810810

811811
void ZmqAgent::run(nsuv::ns_thread*, ZmqAgent* agent) {
812+
USE(uv_thread_setname("NSolidZmqAgent"));
812813
agent->do_start();
813814
do {
814815
ASSERT_EQ(0, uv_run(&agent->loop_, UV_RUN_DEFAULT));

src/nsolid/nsolid_api.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,6 +1640,7 @@ void EnvList::removed_env_cb_(ns_async*, EnvList* envlist) {
16401640

16411641
void EnvList::env_list_routine_(ns_thread*, EnvList* envlist) {
16421642
int er;
1643+
USE(uv_thread_setname("NSolidThread"));
16431644
er = envlist->blocked_loop_timer_.start(
16441645
blocked_loop_timer_cb_, blocked_loop_interval, blocked_loop_interval);
16451646
CHECK_EQ(er, 0);

0 commit comments

Comments
 (0)