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

Function rate_function

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

Source from the content-addressed store, hash-verified

480
481 #[test]
482 fn rate_function() {
483 if let Expr::Call { func, args } = p("rate(requests[5m])") {
484 assert_eq!(func, "rate");
485 assert_eq!(args.len(), 1);
486 assert!(matches!(&args[0], Expr::MatrixSelector { .. }));
487 } else {
488 panic!("expected Call");
489 }
490 }
491
492 #[test]
493 fn binary_precedence() {

Callers

nothing calls this directly

Calls 1

pFunction · 0.85

Tested by

no test coverage detected