Browse Source

converts to pubsub and some cleaning up

master
Jonathan Strong 7 years ago
parent
commit
e07a0f3e48
3 changed files with 4 additions and 22 deletions
  1. +2
    -1
      Cargo.toml
  2. +0
    -20
      src/latency.rs
  3. +2
    -1
      src/lib.rs

+ 2
- 1
Cargo.toml View File

@@ -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 = []

+ 0
- 20
src/latency.rs View File

@@ -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<DateTime<Utc>>
// }

#[derive(Debug, Clone)]
pub struct LatencyUpdate<W>
where W: MeasurementWindow
@@ -295,7 +277,6 @@ impl<W: MeasurementWindow> LatencyUpdate<W> {
pub fn measurement_window(&self) -> Duration {
self.size.duration()
}

}

pub struct Manager {
@@ -460,7 +441,6 @@ impl LatencyManager<WTen> {
let mut plnx_order = DurationWindow::new(w.duration());
let mut plnx_ws_count: Window<u32> = Window::new(w.duration());


// yes I am intentionally breaking from the hard-typed duration
// window ... that was a stupid idea
//


+ 2
- 1
src/lib.rs View File

@@ -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;



Loading…
Cancel
Save