From e07a0f3e48d8f79390602f02aded4a2d59cad82d Mon Sep 17 00:00:00 2001 From: Jonathan Strong Date: Fri, 3 Nov 2017 03:08:06 -0400 Subject: [PATCH] converts to pubsub and some cleaning up --- Cargo.toml | 3 ++- src/latency.rs | 20 -------------------- src/lib.rs | 3 ++- 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c0b06e6..95ea6df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ influent = "0.4" chrono = { version = "0.4", features = ["serde"] } hyper = "0.10" termion = "1.4.0" -pub-sub = "2.0" +# pub-sub = "2.0" slog = "2.0.6" sloggers = "0.2" slog-term = "2" @@ -18,6 +18,7 @@ shuteye = "^0" windows = { path = "../windows" } money = { path = "../money" } +pubsub = { path = "../pubsub" } [features] no-thrash = [] diff --git a/src/latency.rs b/src/latency.rs index a5d5caf..807e321 100644 --- a/src/latency.rs +++ b/src/latency.rs @@ -182,24 +182,6 @@ impl Default for Update { } } -// impl Update { -// pub fn new(window: Duration) -> Self { -// Update { -// window, -// ws: OrderMap::new(), -// http: 0, -// trade: OrderMap::new(), -// } -// } -// } - -// #[derive(Clone)] -// pub struct Updates { -// pub gdax_5: Update, -// pub gdax_30: Update, -// pub last: ByExchange> -// } - #[derive(Debug, Clone)] pub struct LatencyUpdate where W: MeasurementWindow @@ -295,7 +277,6 @@ impl LatencyUpdate { pub fn measurement_window(&self) -> Duration { self.size.duration() } - } pub struct Manager { @@ -460,7 +441,6 @@ impl LatencyManager { let mut plnx_order = DurationWindow::new(w.duration()); let mut plnx_ws_count: Window = Window::new(w.duration()); - // yes I am intentionally breaking from the hard-typed duration // window ... that was a stupid idea // diff --git a/src/lib.rs b/src/lib.rs index 5f44817..d654169 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,13 +12,14 @@ extern crate influent; extern crate chrono; extern crate hyper; extern crate termion; -extern crate pub_sub; +//extern crate pub_sub; extern crate sloggers; extern crate slog_term; extern crate shuteye; //extern crate chashmap; extern crate windows; +extern crate pubsub as pub_sub; use std::sync::Arc;