diff options
Diffstat (limited to 'tests/lexers/promql')
| -rw-r--r-- | tests/lexers/promql/example.txt | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/tests/lexers/promql/example.txt b/tests/lexers/promql/example.txt new file mode 100644 index 00000000..95495185 --- /dev/null +++ b/tests/lexers/promql/example.txt @@ -0,0 +1,68 @@ +---input--- +# A metric with label filtering +go_gc_duration_seconds{instance="localhost:9090", job="alertmanager"} + +# Aggregation operators +sum by (app, proc) ( + instance_memory_limit_bytes - instance_memory_usage_bytes +) / 1024 / 1024 + + +---tokens--- +'# A metric with label filtering' Comment.Single +'\n' Text.Whitespace + +'go_gc_duration_seconds' Name.Variable +'{' Punctuation +'instance' Name.Label +'=' Operator +'"' Punctuation +'localhost:9090' Literal.String +'"' Punctuation +',' Punctuation +' ' Text.Whitespace +'job' Name.Label +'=' Operator +'"' Punctuation +'alertmanager' Literal.String +'"' Punctuation +'}' Punctuation +'\n' Text.Whitespace + +'\n' Text.Whitespace + +'# Aggregation operators' Comment.Single +'\n' Text.Whitespace + +'sum' Keyword +' ' Text.Whitespace +'by' Keyword +' ' Text.Whitespace +'(' Operator +'app' Name.Variable +',' Punctuation +' ' Text.Whitespace +'proc' Name.Variable +')' Operator +' ' Text.Whitespace +'(' Operator +'\n' Text.Whitespace + +' ' Text.Whitespace +'instance_memory_limit_bytes' Name.Variable +' ' Text.Whitespace +'-' Operator +' ' Text.Whitespace +'instance_memory_usage_bytes' Name.Variable +'\n' Text.Whitespace + +')' Operator +' ' Text.Whitespace +'/' Operator +' ' Text.Whitespace +'1024' Literal.Number.Integer +' ' Text.Whitespace +'/' Operator +' ' Text.Whitespace +'1024' Literal.Number.Integer +'\n' Text.Whitespace |
