2019-12-02 16:46:46 -08:00
|
|
|
use log::*;
|
|
|
|
|
|
|
|
pub const SOLANA_SYS_TUNER_PATH: &str = "/tmp/solana-sys-tuner";
|
|
|
|
|
2019-12-02 18:45:07 -08:00
|
|
|
#[cfg(unix)]
|
2019-12-02 16:46:46 -08:00
|
|
|
pub fn request_realtime_poh() {
|
|
|
|
info!("Sending tuning request");
|
2019-12-02 18:45:07 -08:00
|
|
|
let status = unix_socket::UnixStream::connect(SOLANA_SYS_TUNER_PATH);
|
2020-04-14 12:00:24 -07:00
|
|
|
match status {
|
|
|
|
Ok(_) => info!("Successfully sent tuning request"),
|
|
|
|
Err(err) => warn!(
|
|
|
|
"Failed to send tuning request, is `solana-sys-tuner` running? {:?}",
|
|
|
|
err
|
|
|
|
),
|
|
|
|
}
|
2019-12-02 16:46:46 -08:00
|
|
|
}
|
2019-12-02 18:45:07 -08:00
|
|
|
|
|
|
|
#[cfg(not(unix))]
|
|
|
|
pub fn request_realtime_poh() {
|
|
|
|
info!("Tuning request ignored on this platform");
|
|
|
|
}
|