Use spdlog::trace instead of info for simulator-related messages
This commit is contained in:
parent
c0a103e851
commit
e0086e5666
@ -52,13 +52,13 @@ void SimulatorHandle::IncrementServerCountAndWaitForQuiescentState(Address addre
|
||||
const bool all_servers_blocked = blocked_servers == server_addresses_.size();
|
||||
|
||||
if (all_servers_blocked) {
|
||||
spdlog::info("quiescent state detected - {} out of {} servers now blocked on receive", blocked_servers,
|
||||
server_addresses_.size());
|
||||
spdlog::trace("quiescent state detected - {} out of {} servers now blocked on receive", blocked_servers,
|
||||
server_addresses_.size());
|
||||
return;
|
||||
}
|
||||
|
||||
spdlog::info("not returning from quiescent because we see {} blocked out of {}", blocked_servers,
|
||||
server_addresses_.size());
|
||||
spdlog::trace("not returning from quiescent because we see {} blocked out of {}", blocked_servers,
|
||||
server_addresses_.size());
|
||||
cv_.wait(lock);
|
||||
}
|
||||
}
|
||||
@ -88,7 +88,7 @@ bool SimulatorHandle::MaybeTickSimulator() {
|
||||
|
||||
// We allow the simulator to progress the state of the system only
|
||||
// after all servers are blocked on receive.
|
||||
spdlog::info("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ simulator tick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
|
||||
spdlog::trace("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ simulator tick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
|
||||
stats_.simulator_ticks++;
|
||||
blocked_on_receive_.clear();
|
||||
cv_.notify_all();
|
||||
@ -96,7 +96,7 @@ bool SimulatorHandle::MaybeTickSimulator() {
|
||||
bool timed_anything_out = TimeoutPromisesPastDeadline();
|
||||
|
||||
if (timed_anything_out) {
|
||||
spdlog::info("simulator progressing: timed out a request");
|
||||
spdlog::trace("simulator progressing: timed out a request");
|
||||
}
|
||||
|
||||
const Duration clock_advance = std::chrono::microseconds{time_distrib_(rng_)};
|
||||
@ -110,7 +110,7 @@ bool SimulatorHandle::MaybeTickSimulator() {
|
||||
// by only advancing the clock by an even amount etc...) and only advancing the clock close to
|
||||
// half of the time.
|
||||
if (clock_advance.count() % 97 > 49) {
|
||||
spdlog::info("simulator progressing: clock advanced by {}", clock_advance.count());
|
||||
spdlog::trace("simulator progressing: clock advanced by {}", clock_advance.count());
|
||||
cluster_wide_time_microseconds_ += clock_advance;
|
||||
stats_.elapsed_time = cluster_wide_time_microseconds_ - config_.start_time;
|
||||
}
|
||||
@ -157,22 +157,22 @@ bool SimulatorHandle::MaybeTickSimulator() {
|
||||
if (should_drop || normal_timeout) {
|
||||
stats_.timed_out_requests++;
|
||||
dop.promise.TimeOut();
|
||||
spdlog::info("simulator timing out request ");
|
||||
spdlog::trace("simulator timing out request ");
|
||||
} else {
|
||||
stats_.total_responses++;
|
||||
Duration response_latency = cluster_wide_time_microseconds_ - dop.requested_at;
|
||||
auto type_info = opaque_message.type_info;
|
||||
dop.promise.Fill(std::move(opaque_message), response_latency);
|
||||
histograms_.Measure(type_info, response_latency);
|
||||
spdlog::info("simulator replying to request");
|
||||
spdlog::trace("simulator replying to request");
|
||||
}
|
||||
} else if (should_drop) {
|
||||
// don't add it anywhere, let it drop
|
||||
spdlog::info("simulator silently dropping request");
|
||||
spdlog::trace("simulator silently dropping request");
|
||||
} else {
|
||||
// add to can_receive_ if not
|
||||
spdlog::info("simulator adding message to can_receive_ from {} to {}", opaque_message.from_address.last_known_port,
|
||||
opaque_message.to_address.last_known_port);
|
||||
spdlog::trace("simulator adding message to can_receive_ from {} to {}", opaque_message.from_address.last_known_port,
|
||||
opaque_message.to_address.last_known_port);
|
||||
const auto &[om_vec, inserted] =
|
||||
can_receive_.try_emplace(to_address.ToPartialAddress(), std::vector<OpaqueMessage>());
|
||||
om_vec->second.emplace_back(std::move(opaque_message));
|
||||
|
@ -64,7 +64,7 @@ class SimulatorHandle {
|
||||
for (auto it = promises_.begin(); it != promises_.end();) {
|
||||
auto &[promise_key, dop] = *it;
|
||||
if (dop.deadline < now && config_.perform_timeouts) {
|
||||
spdlog::info("timing out request from requester {}.", promise_key.requester_address.ToString());
|
||||
spdlog::trace("timing out request from requester {}.", promise_key.requester_address.ToString());
|
||||
std::move(dop).promise.TimeOut();
|
||||
it = promises_.erase(it);
|
||||
|
||||
@ -106,7 +106,7 @@ class SimulatorHandle {
|
||||
template <Message Request, Message Response>
|
||||
ResponseFuture<Response> SubmitRequest(Address to_address, Address from_address, Request &&request, Duration timeout,
|
||||
std::function<bool()> &&maybe_tick_simulator) {
|
||||
spdlog::info("submitting request to {}", to_address.last_known_port);
|
||||
spdlog::trace("submitting request to {}", to_address.last_known_port);
|
||||
auto type_info = TypeInfoFor(request);
|
||||
|
||||
auto [future, promise] = memgraph::io::FuturePromisePairWithNotifier<ResponseResult<Response>>(
|
||||
@ -173,20 +173,20 @@ class SimulatorHandle {
|
||||
if (!should_shut_down_) {
|
||||
if (!blocked_on_receive_.contains(receiver)) {
|
||||
blocked_on_receive_.emplace(receiver);
|
||||
spdlog::info("blocking receiver {}", receiver.ToPartialAddress().port);
|
||||
spdlog::trace("blocking receiver {}", receiver.ToPartialAddress().port);
|
||||
cv_.notify_all();
|
||||
}
|
||||
cv_.wait(lock);
|
||||
}
|
||||
}
|
||||
spdlog::info("timing out receiver {}", receiver.ToPartialAddress().port);
|
||||
spdlog::trace("timing out receiver {}", receiver.ToPartialAddress().port);
|
||||
|
||||
return TimedOut{};
|
||||
}
|
||||
|
||||
template <Message M>
|
||||
void Send(Address to_address, Address from_address, RequestId request_id, M message) {
|
||||
spdlog::info("sending message from {} to {}", from_address.last_known_port, to_address.last_known_port);
|
||||
spdlog::trace("sending message from {} to {}", from_address.last_known_port, to_address.last_known_port);
|
||||
auto type_info = TypeInfoFor(message);
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mu_);
|
||||
|
Loading…
Reference in New Issue
Block a user