Browse Source

upgrades windows crate to v0.2

master
Jonathan Strong 6 years ago
parent
commit
3991b335d6
2 changed files with 12 additions and 12 deletions
  1. +1
    -1
      Cargo.toml
  2. +11
    -11
      src/latency.rs

+ 1
- 1
Cargo.toml View File

@@ -31,7 +31,7 @@ sloggers = { path = "../sloggers" }


decimal = { path = "../decimal", version = "2" } decimal = { path = "../decimal", version = "2" }


windows = { path = "../windows", version = "0.1" }
windows = { path = "../windows", version = "0.2" }
money = { path = "../money", version = "0.2" } money = { path = "../money", version = "0.2" }
pubsub = { path = "../pubsub" } pubsub = { path = "../pubsub" }




+ 11
- 11
src/latency.rs View File

@@ -257,8 +257,8 @@ impl Manager {
debug!(logger, "initalizing broadcast"); debug!(logger, "initalizing broadcast");


let update = Update { let update = Update {
gdax_ws: gdax_ws.refresh(&loop_time).mean_nanos(),
gdax_trade: gdax_trade.refresh(&loop_time).mean_nanos(),
gdax_ws: gdax_ws.refresh(loop_time).mean_nanos(),
gdax_trade: gdax_trade.refresh(loop_time).mean_nanos(),
gdax_last: dt_from_dur(loop_time - last.gdax) gdax_last: dt_from_dur(loop_time - last.gdax)
}; };
channel.send(update).unwrap(); channel.send(update).unwrap();
@@ -395,15 +395,15 @@ impl LatencyManager {
// above, we need a fresh Instant to avoid less than other // above, we need a fresh Instant to avoid less than other
// panic // panic
// //
krkn_trade_30.refresh(&loop_time);
krkn_trade_300.refresh(&loop_time);
krkn_trade_30.refresh(loop_time);
krkn_trade_300.refresh(loop_time);
let update = LatencyUpdate { let update = LatencyUpdate {
gdax_ws: gdax_ws.refresh(&loop_time).mean_nanos(),
krkn_pub: krkn_pub.refresh(&loop_time).mean_nanos(),
krkn_priv: krkn_priv.refresh(&loop_time).mean_nanos(),
plnx_pub: plnx_pub.refresh(&loop_time).mean_nanos(),
plnx_priv: plnx_priv.refresh(&loop_time).mean_nanos(),
plnx_order: plnx_order.refresh(&loop_time).mean_nanos(),
gdax_ws: gdax_ws.refresh(loop_time).mean_nanos(),
krkn_pub: krkn_pub.refresh(loop_time).mean_nanos(),
krkn_priv: krkn_priv.refresh(loop_time).mean_nanos(),
plnx_pub: plnx_pub.refresh(loop_time).mean_nanos(),
plnx_priv: plnx_priv.refresh(loop_time).mean_nanos(),
plnx_order: plnx_order.refresh(loop_time).mean_nanos(),


krkn_trade_30_mean: krkn_trade_30.mean_nanos(), krkn_trade_30_mean: krkn_trade_30.mean_nanos(),
krkn_trade_30_max: krkn_trade_30.max_nanos().unwrap_or(0), krkn_trade_30_max: krkn_trade_30.max_nanos().unwrap_or(0),
@@ -414,7 +414,7 @@ impl LatencyManager {
plnx_last: dt_from_dur(loop_time - last.plnx), plnx_last: dt_from_dur(loop_time - last.plnx),
krkn_last: dt_from_dur(loop_time - last.krkn), krkn_last: dt_from_dur(loop_time - last.krkn),


plnx_ws_count: plnx_ws_count.refresh(&loop_time).count() as u64,
plnx_ws_count: plnx_ws_count.refresh(loop_time).count() as u64,


}; };
channel.send(update).unwrap(); channel.send(update).unwrap();


Loading…
Cancel
Save