Skip to content

Commit

Permalink
as112: exclude very low values
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed Jun 15, 2024
1 parent 067f0e1 commit f05c8cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions derivation.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{ pkgs, cargoToml, ... }:
{ lib, pkgs, cargoToml, ... }:
let
manifest = (pkgs.lib.importTOML cargoToml).package;
manifest = (lib.importTOML cargoToml).package;
in
pkgs.rustPlatform.buildRustPackage {
pname = manifest.name;
version = manifest.version;
cargoLock.lockFile = ./Cargo.lock;
src = pkgs.lib.cleanSource ./.;
src = lib.cleanSource ./.;
cargoBuildFlags = "-p ${manifest.name}";
cargoTestFlags = "-p ${manifest.name}";
}
2 changes: 1 addition & 1 deletion src/stats/as112.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl As112Updater {
points: f64,
) -> anyhow::Result<Series<HashMap<String, Vec<(f64, f64)>>>> {
let query = PrometheusQuery {
query: "sum by (type) (rate(knot_query_type_total[5m]))".to_string(),
query: "sum by (type) (rate(knot_query_type_total[5m])) >= 0.01".to_string(),
start,
end,
step: ((end - start) / points).as_seconds_f64(),
Expand Down

0 comments on commit f05c8cf

Please sign in to comment.