0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-28 11:48:54 +02:00

ircd: Improve various context names for consistency.

This commit is contained in:
Jason Volk 2019-07-20 14:56:10 -07:00
parent e4372253a8
commit 2f2bc867fb
7 changed files with 19 additions and 10 deletions

View file

@ -38,6 +38,8 @@ struct ircd::db::database::env::state::pool
database &d; database &d;
Priority pri; Priority pri;
IOPriority iopri; IOPriority iopri;
char namebuf[16];
string_view name;
ctx::dock dock; ctx::dock dock;
uint64_t taskctr {0}; uint64_t taskctr {0};
std::deque<task> tasks; std::deque<task> tasks;

View file

@ -3975,6 +3975,13 @@ ircd::db::database::env::state::pool::pool(database &d,
IOPriority::IO_HIGH: IOPriority::IO_HIGH:
IOPriority::IO_LOW IOPriority::IO_LOW
} }
,name
{
fmt::sprintf
{
namebuf, "db.%s", reflect(pri)
}
}
,popts ,popts
{ {
size_t(stack_size), // stack size of worker size_t(stack_size), // stack size of worker
@ -3984,7 +3991,7 @@ ircd::db::database::env::state::pool::pool(database &d,
} }
,p ,p
{ {
reflect(pri), // name of pool this->name, // name of pool
this->popts // pool options this->popts // pool options
} }
{ {

View file

@ -89,7 +89,7 @@ ircd::log::LOG_NAME_TRUNC
decltype(ircd::log::CTX_NAME_TRUNC) decltype(ircd::log::CTX_NAME_TRUNC)
ircd::log::CTX_NAME_TRUNC ircd::log::CTX_NAME_TRUNC
{ {
8 10
}; };
/// The '*' logger is for log::mark()'s which do not target any specific named /// The '*' logger is for log::mark()'s which do not target any specific named

View file

@ -639,7 +639,7 @@ namespace ircd::m::sync
decltype(ircd::m::sync::pool) decltype(ircd::m::sync::pool)
ircd::m::sync::pool ircd::m::sync::pool
{ {
"sync", pool_opts "m.sync", pool_opts
}; };
decltype(ircd::m::sync::stats_info) decltype(ircd::m::sync::stats_info)

View file

@ -31,13 +31,13 @@ static void handle_notify(const m::event &, m::vm::eval &);
context context
sender sender
{ {
"fedsnd S", 1_MiB, &send_worker, context::POST, "m.fedsnd.S", 1_MiB, &send_worker, context::POST,
}; };
context context
receiver receiver
{ {
"fedsnd R", 1_MiB, &recv_worker, context::POST, "m.fedsnd.R", 1_MiB, &recv_worker, context::POST,
}; };
mapi::header mapi::header

View file

@ -56,13 +56,13 @@ ircd::m::fetch::hook
decltype(ircd::m::fetch::request_context) decltype(ircd::m::fetch::request_context)
ircd::m::fetch::request_context ircd::m::fetch::request_context
{ {
"m::fetch req", 512_KiB, &request_worker, context::POST "m.fetch.req", 512_KiB, &request_worker, context::POST
}; };
decltype(ircd::m::fetch::eval_context) decltype(ircd::m::fetch::eval_context)
ircd::m::fetch::eval_context ircd::m::fetch::eval_context
{ {
"m::fetch eval", 512_KiB, &eval_worker, context::POST "m.fetch.eval", 512_KiB, &eval_worker, context::POST
}; };
decltype(ircd::m::fetch::complete) decltype(ircd::m::fetch::complete)

View file

@ -113,15 +113,15 @@ ircd::net::dns::resolver::resolver(answers_callback callback)
} }
,recv_context ,recv_context
{ {
"dnsres R", 1_MiB, std::bind(&resolver::recv_worker, this), context::POST "net.dns.R", 1_MiB, std::bind(&resolver::recv_worker, this), context::POST
} }
,timeout_context ,timeout_context
{ {
"dnsres T", 64_KiB, std::bind(&resolver::timeout_worker, this), context::POST "net.dns.T", 64_KiB, std::bind(&resolver::timeout_worker, this), context::POST
} }
,sendq_context ,sendq_context
{ {
"dnsres S", 64_KiB, std::bind(&resolver::sendq_worker, this), context::POST "net.dns.S", 64_KiB, std::bind(&resolver::sendq_worker, this), context::POST
} }
{ {
ns.open(ip::udp::v4()); ns.open(ip::udp::v4());