Drawing a percentage in graphite

Asked by Steve Freegard

Hello,

Can anyone tell me how I might achieve the following using Graphite:

((series1 - series2) / (series1 + series2)) * 100

I'm graphing events from my spam filter and I'm trying to show accuracy % over the graph lifetime, so series1 is the number of classifications and series2 is the number of reported misclassifications.

Any help to achieve this would be appreciated.

Kind regards,
Steve.

Question information

Language:
English Edit question
Status:
Answered
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Brian Lalor (blalor) said :
#1

On Jan 9, 2013, at 7:45 PM, Steve Freegard <email address hidden> wrote:

> Can anyone tell me how I might achieve the following using Graphite:
>
> ((series1 - series2) / (series1 + series2)) * 100

I think you want asPercent: http://graphite.readthedocs.org/en/0.9.10/functions.html#graphite.render.functions.asPercent

I think you could do

 asPercent(diffSeries(series1, series2), sum(series1, series2))

Can you help with this problem?

Provide an answer of your own, or ask Steve Freegard for more information if necessary.

To post a message you must log in.