mirror of
https://github.com/prometheus/prometheus
synced 2024-12-26 00:23:18 +00:00
Address review comments
Signed-off-by: Levi Harrison <git@leviharrison.dev>
This commit is contained in:
parent
e27ac3e7e4
commit
2f896c98ff
@ -44,7 +44,7 @@ the result.
|
||||
|
||||
The following trigonometric binary operators, which work in radians, exist in Prometheus:
|
||||
|
||||
* `atan2` (https://pkg.go.dev/math#Atan2, _This is experimental_)
|
||||
* `atan2` (based on https://pkg.go.dev/math#Atan2, _This is experimental_)
|
||||
|
||||
Trigonometric operators allow trigonometric functions to be executed on two vectors using
|
||||
vector matching, which isn't available with normal functions. They act in the same manner
|
||||
|
@ -17,7 +17,6 @@
|
||||
@precedence {
|
||||
pow @right,
|
||||
mul @left
|
||||
atan2 @left,
|
||||
add @left,
|
||||
eql @left,
|
||||
and @left,
|
||||
|
@ -840,3 +840,10 @@ sum:my_metric_name:rate5m
|
||||
|
||||
==>
|
||||
MetricName(MetricIdentifier(Identifier))
|
||||
|
||||
# Testing Atan2 inherited precedence level
|
||||
|
||||
1 + foo atan2 bar
|
||||
|
||||
==>
|
||||
PromQL(Expr(BinaryExpr(Expr(NumberLiteral),Add,BinModifiers,Expr(BinaryExpr(Expr(VectorSelector(MetricIdentifier(Identifier))),Atan2,BinModifiers,Expr(VectorSelector(MetricIdentifier(Identifier))))))))
|
@ -14,6 +14,7 @@
|
||||
import {
|
||||
And,
|
||||
Avg,
|
||||
Atan2,
|
||||
Bool,
|
||||
Bottomk,
|
||||
By,
|
||||
@ -58,6 +59,7 @@ export const specializeIdentifier = (value, stack) => {
|
||||
|
||||
const contextualKeywordTokens = {
|
||||
avg: Avg,
|
||||
atan2: Atan2,
|
||||
bottomk: Bottomk,
|
||||
count: Count,
|
||||
count_values: CountValues,
|
||||
|
Loading…
Reference in New Issue
Block a user