Skip to content

Commit f05c8cf

Browse files
committed
as112: exclude very low values
1 parent 067f0e1 commit f05c8cf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

derivation.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
{ pkgs, cargoToml, ... }:
1+
{ lib, pkgs, cargoToml, ... }:
22
let
3-
manifest = (pkgs.lib.importTOML cargoToml).package;
3+
manifest = (lib.importTOML cargoToml).package;
44
in
55
pkgs.rustPlatform.buildRustPackage {
66
pname = manifest.name;
77
version = manifest.version;
88
cargoLock.lockFile = ./Cargo.lock;
9-
src = pkgs.lib.cleanSource ./.;
9+
src = lib.cleanSource ./.;
1010
cargoBuildFlags = "-p ${manifest.name}";
11+
cargoTestFlags = "-p ${manifest.name}";
1112
}

src/stats/as112.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl As112Updater {
7878
points: f64,
7979
) -> anyhow::Result<Series<HashMap<String, Vec<(f64, f64)>>>> {
8080
let query = PrometheusQuery {
81-
query: "sum by (type) (rate(knot_query_type_total[5m]))".to_string(),
81+
query: "sum by (type) (rate(knot_query_type_total[5m])) >= 0.01".to_string(),
8282
start,
8383
end,
8484
step: ((end - start) / points).as_seconds_f64(),

0 commit comments

Comments
 (0)