Increase llmp timeout & Print PID in logger (#1970)

* increase timeout & print pid for logger

* log

* aa

* rename stuff
This commit is contained in:
Dongjia "toka" Zhang 2024-03-25 19:15:46 +01:00 committed by GitHub
parent 7170b5391b
commit 53bfae0a08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 8 deletions

View File

@ -205,7 +205,7 @@ where
Ok(llmp::LlmpMsgHookResult::ForwardToClients)
}
} else {
monitor.display("Broker", ClientId(0));
monitor.display("Broker Heartbeat", ClientId(0));
Ok(llmp::LlmpMsgHookResult::Handled)
}
},
@ -249,6 +249,7 @@ where
if id == client_id {
// do not update executions for forwarded messages, otherwise we loose the total order
// as a forwarded msg with a lower executions may arrive after a stats msg with an higher executions
// this also means when you wrap this event manger with centralized EM, you will **NOT** get executions update with the new tc message
client.update_executions(*executions, *time);
}
monitor.display(event.name(), id);

View File

@ -386,12 +386,12 @@ where
time: _,
executions: _,
phantom: _,
}
| Event::UpdateUserStats {
} => "Client Heartbeat",
Event::UpdateUserStats {
name: _,
value: _,
phantom: _,
} => "Stats",
} => "UserStats",
#[cfg(feature = "introspection")]
Event::UpdatePerfMonitor {
time: _,

View File

@ -180,6 +180,7 @@ where
) -> Result<(), Error> {
let monitor_timeout = STATS_TIMEOUT_DEFAULT;
loop {
// log::info!("Starting another fuzz_loop");
manager.maybe_report_progress(state, monitor_timeout)?;
self.fuzz_one(stages, executor, state, manager)?;
}
@ -212,6 +213,7 @@ where
let monitor_timeout = STATS_TIMEOUT_DEFAULT;
for _ in 0..iters {
// log::info!("Starting another fuzz_loop");
manager.maybe_report_progress(state, monitor_timeout)?;
ret = Some(self.fuzz_one(stages, executor, state, manager)?);
}

View File

@ -872,8 +872,9 @@ impl log::Log for SimpleStdoutLogger {
fn log(&self, record: &Record) {
println!(
"[{:?}] {}: {}",
"[{:?}, {:?}] {}: {}",
current_time(),
std::process::id(),
record.level(),
record.args()
);
@ -918,8 +919,9 @@ impl log::Log for SimpleStderrLogger {
fn log(&self, record: &Record) {
eprintln!(
"[{:?}] {}: {}",
"[{:?}, {:?}] {}: {}",
current_time(),
std::process::id(),
record.level(),
record.args()
);
@ -982,8 +984,9 @@ impl log::Log for SimpleFdLogger {
let mut f = unsafe { File::from_raw_fd(self.fd) };
writeln!(
f,
"[{:?}] {}: {}",
"[{:?}, {:#?}] {}: {}",
current_time(),
std::process::id(),
record.level(),
record.args()
)

View File

@ -105,7 +105,7 @@ use crate::{
};
/// The default timeout in seconds after which a client will be considered stale, and removed.
pub const DEFAULT_CLIENT_TIMEOUT_SECS: Duration = Duration::from_secs(300);
pub const DEFAULT_CLIENT_TIMEOUT_SECS: Duration = Duration::from_secs(7200);
/// The max number of pages a [`client`] may have mapped that were not yet read by the [`broker`]
/// Usually, this value should not exceed `1`, else the broker cannot keep up with the amount of incoming messages.