Skip to content

Commit

Permalink
Correct interpretation of skip aggregate flag (#33)
Browse files Browse the repository at this point in the history
This commit corrects the negation of the skip aggregate flag,
an unfortunate goof given that this was _just_ flipped on in
production. Such are the wages of a lack of integration testing.

Signed-off-by: Brian L. Troutwine <blt@postmates.com>
  • Loading branch information
blt authored Jul 13, 2016
1 parent ec010bf commit b82e84e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cernan"
version = "0.2.0"
version = "0.2.1"
authors = ["Brian L. Troutwine <blt@postmates.com>"]
build = "build.rs"

Expand Down
6 changes: 3 additions & 3 deletions src/backends/wavefront.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Wavefront {
Wavefront {
addr: addr,
tags: tags,
mk_aggrs: !skip_aggrs,
mk_aggrs: skip_aggrs,
aggrs: Buckets::new(),
points: Vec::new(),
}
Expand Down Expand Up @@ -141,7 +141,7 @@ mod test {

#[test]
fn test_format_wavefront() {
let mut wavefront = Wavefront::new("127.0.0.1", 2003, false, "source=test-src".to_string());
let mut wavefront = Wavefront::new("127.0.0.1", 2003, true, "source=test-src".to_string());
let dt = UTC.ymd(1990, 6, 12).and_hms_milli(9, 10, 11, 12);
wavefront.deliver(Rc::new(Metric::new_with_time(Atom::from("test.counter"),
1.0,
Expand Down Expand Up @@ -185,7 +185,7 @@ mod test {

#[test]
fn test_format_wavefront_skip_aggrs() {
let mut wavefront = Wavefront::new("127.0.0.1", 2003, true, "source=test-src".to_string());
let mut wavefront = Wavefront::new("127.0.0.1", 2003, false, "source=test-src".to_string());
let dt = UTC.ymd(1990, 6, 12).and_hms_milli(9, 10, 11, 12);
wavefront.deliver(Rc::new(Metric::new_with_time(Atom::from("test.counter"),
1.0,
Expand Down
2 changes: 1 addition & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub fn parse_args() -> Args {
.default_value("127.0.0.1"))
.arg(Arg::with_name("wavefront-skip-aggrs")
.long("wavefront-skip-aggrs")
.help("Send aggregate metrics to wavefront")) // default false
.help("Skip sending aggregate metrics to wavefront")) // default false
.arg(Arg::with_name("librato-username")
.long("librato-username")
.help("The librato username for authentication.")
Expand Down

0 comments on commit b82e84e

Please sign in to comment.