← Back to team overview

graphite-dev team mailing list archive

Arithmetic expressions

 

Hello,

I managed to make some experimental modifications in Graphite code for
in-house purposes. The idea was to support simple arithmetic
expressions instead of emulate em via functions. So, for example, I be
able to write:

http://0.0.0.0:8080/render?target=carbon.agents.honduras.cpuUsage*20
http://0.0.0.0:8080/render?target=carbon.agents.honduras.cpuUsage*(20*10)
http://0.0.0.0:8080/render?target=carbon.agents.honduras.cpuUsage/100

(examples from my test suite).
and so on...

My modifications based on FourFn.py pyparsing's example so "complex"
expressions are also supported.

Now I am looking the way to contribute them back in project if any
external interest exists. The problem is that they are not fully
compatible with existing syntax. For example - multiplication operator
conflicts with wildcard * symbol, plus sign obviously should not
present in url since it decoded as space and so on...

Any advises are welcomed. Does anybody interesting in such syntax?


Vladimir Ignatov



Follow ups