Commit Graph

381 Commits

Author SHA1 Message Date
Fabian Reinartz
e3b6ec9784 Switch to common/log 2015-10-03 10:21:43 +02:00
Brian Brazil
29e8dc2c49 promql: Add 'bool' modifier to comparison functions
When doing comparison operations on vectors, filtering
sometimes gets in the way and you have to go to a fair bit of
effort to workaround it in order to always return a result.
The 'bool' modifier instead of filtering returns 0/1 depending
on the result of the compairson.

This is also a prerequisite to removing plain scalar/scalar comparisons,
as it maintains the current behaviour under a new syntax.
2015-09-02 14:51:44 +01:00
Julius Volz
077a753e6b Merge pull request #1006 from prometheus/true-values
promql: Remove interpolation of vector values.
2015-08-25 16:11:07 +02:00
Fabian Reinartz
d6b8da8d43 Switch promql types to common/model 2015-08-25 13:49:14 +02:00
Brian Brazil
fb585e4591 promql: Remove interpolation of vector values.
The current behaviour produces values that are not
from rules or scrapes. So if for example I have
a boolean 0/1 it can be returned as 0.2344589. This
prevents a number of advanced use cases, introduces
race conditions and can produce misleading graphs.
2015-08-24 17:37:31 +01:00
Fabian Reinartz
1535ef1457 Replace metric.SamplePair with model.SamplePair 2015-08-22 14:52:35 +02:00
Fabian Reinartz
438e232c9b Fix grouping of import blocks 2015-08-22 09:42:45 +02:00
Fabian Reinartz
306e8468a0 Switch from client_golang/model to common/model 2015-08-21 13:33:38 +02:00
Laurie Malau
cdf38ab93a Log runtime errors during query evaluation instead of panicking. 2015-08-19 16:56:41 +02:00
Julius Volz
27ed874358 Implement label_replace()
Implements part of https://github.com/prometheus/prometheus/issues/959.
2015-08-18 14:20:07 +02:00
Fabian Reinartz
690b5f1575 Remove multi-statement queries
This commit removes the possibility to have multi-statement queries
which had no full support anyway. This makes the caller responsible
for multi-statement semantics.
Multiple tests are no longer timing-dependent.
2015-08-10 14:26:20 +02:00
Fabian Reinartz
579fdf65e2 Implement unary expression for vector types.
Closes #956
2015-08-04 15:46:36 +02:00
Fabian Reinartz
3d67d75935 promql: implement JSON array format for scalar and string 2015-07-06 13:09:26 +02:00
Fabian Reinartz
77e8983221 promql: add MarshalJSON method for SamplePair 2015-07-06 10:29:59 +02:00
Fabian Reinartz
70d7a987a7 promql: add json tags, fix query constructor. 2015-06-25 13:44:05 +02:00
Fabian Reinartz
fe301d7946 promql: remove global flags 2015-06-15 19:01:06 +02:00
Fabian Reinartz
c32ae22119 promql: fix missing metric in range results. 2015-06-11 23:50:53 +02:00
Fabian Reinartz
cb10ceac18 promql: allow scalar expressions in range queries, improve errors.
These changes allow to do range queries over scalar expressions.
Errors on bad types for range queries are now raised on query creation
rather than evaluation.
2015-06-10 18:36:02 +02:00
Fabian Reinartz
0de6edbdfc Move pkg/ to util/ 2015-06-01 21:12:32 +02:00
Fabian Reinartz
ccf51b132e Move stats package to pkg/stats 2015-06-01 21:12:31 +02:00
beorn7
3b9c421a69 Weed out all the [Gg]et* method names.
The only exception is getNumChunksToPersist to avoid naming the struct
member numChunksToPersist in a weird way.
2015-05-20 19:13:06 +02:00
Fabian Reinartz
ac4d63b833 Merge pull request #689 from prometheus/fabxc/qltest
Add basic testing language, migrate tests
2015-05-18 19:22:48 +02:00
Fabian Reinartz
6321964738 Add parsing and execution of new test format.
This commit adds a new test structure that parses and executes
the new testing language.
2015-05-18 17:47:47 +02:00
Fabian Reinartz
ce487f763e Simplify vector binary evaluation logic 2015-05-17 00:02:34 +02:00
Fabian Reinartz
8a109e061b Extract OR operation into own eval method. 2015-05-16 14:00:11 +02:00
Fabian Reinartz
2c3e9e2e87 Extract AND operation into own eval method. 2015-05-16 13:33:03 +02:00
Fabian Reinartz
9ab1f6c690 Limit maximum number of concurrent queries.
A high number of concurrent queries can slow each other down
so that none of them is reasonbly responsive. This commit limits
the number of queries being concurrently executed.
2015-05-06 11:34:17 +02:00
Fabian Reinartz
d59d1cb2c1 Fix Error() methods. 2015-05-01 17:58:58 +02:00
Fabian Reinartz
fe935179cd Stop routing rule statements through the engine. 2015-04-29 18:01:43 +02:00
Fabian Reinartz
25cdff3527 Remove name arg from Parse* functions, enhance parsing errors. 2015-04-29 16:38:41 +02:00
Fabian Reinartz
5602328c7c Refactor query evaluation.
This copies the evaluation logic from the current rules/ package.
The new engine handles the execution process from query string to final result.
It provides query timeout and cancellation and general flexibility for
future changes.

functions.go: Add evaluation implementation. Slight changes to in/out data but
	not to the processing logic.
quantile.go: No changes.
analyzer.go: No changes.
engine.go: Actually new part. Mainly consists of evaluation methods
	which were not changed.
setup_test.go: Copy of rules/helpers_test.go to setup test storage.
promql_test.go: Copy of rules/rules_test.go.
2015-04-28 14:19:05 +02:00