MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / aggregation_by

Function aggregation_by

nodedb/src/control/promql/parser.rs:503–510  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

501
502 #[test]
503 fn aggregation_by() {
504 if let Expr::Aggregate { op, grouping, .. } = p("sum by (job) (rate(requests[5m]))") {
505 assert_eq!(op, AggOp::Sum);
506 assert_eq!(grouping, Grouping::By(vec!["job".into()]));
507 } else {
508 panic!("expected Aggregate");
509 }
510 }
511
512 #[test]
513 fn topk_with_param() {

Callers

nothing calls this directly

Calls 1

pFunction · 0.85

Tested by

no test coverage detected