Absolutely, we'd love a PR! Adding functions is one of the most welcomed
PRs and with the new query engine from 0.11 it should be relatively
straightforward. Holler at me or @jsternberg in the issue if you need
assistance with the PR.

On Mon, Aug 1, 2016 at 4:28 PM, Conrad Irwin <[email protected]> wrote:

> Done as https://github.com/influxdata/influxdb/issues/7105,
>
> Thanks!
>
> Conrad
>
> P.S. Is this the kind of thing you'd accept a pull-request for? I'd love
> to get my hands dirty
>
> Sent via Superhuman <https://superhuman.com/?utm_source=signature>
>
> On Mon, Aug 01, 2016 at 3:04 PM, Sean Beckett<[email protected]>wrote:
>
>> Please open a feature request
>> <https://github.com/influxdata/influxdb/issues/new> for this function,
>> as GitHub is a better place to discuss possible improvements to
>> functionality.
>>
>> On Mon, Aug 1, 2016 at 1:26 PM, <[email protected]> wrote:
>>
>>> Hi Influx,
>>>
>>> Right now for performance graph we use a format that's the inverse of
>>> percentiles. e.g. We define "great" performance as taking less than 25ms,
>>> "good" as <50ms, "ok" as <100ms, "bad" as <1s, and "awful" for everything
>>> else.
>>>
>>> The advantage of this is that it's easy to see "how well are we doing?"
>>> because you end up with a colourful stacked graph, and humans are pretty
>>> good at relative area perception. The result looks like this:
>>> http://imgur.com/a/MwdfB
>>>
>>> The downside is that the queries needed to create these graphs are
>>> pretty verbose, and I need to use grafana's ability to render stacked
>>> graphs with a total of 100%.
>>>
>>> SELECT count(value) FROM "ui.switch_thread" WHERE $timeFilter AND value
>>> <= 25 GROUP BY time($interval)
>>> SELECT count(value) FROM "ui.switch_thread" WHERE $timeFilter AND value
>>> > 25 AND value <= 50  GROUP BY time($interval)
>>> SELECT count(value) FROM "ui.switch_thread" WHERE $timeFilter AND value
>>> > 50 AND value <= 100  GROUP BY time($interval)
>>> SELECT count(value) FROM "ui.switch_thread" WHERE $timeFilter AND value
>>> > 100 AND value <= 1000 GROUP BY time($interval)
>>> SELECT count(value) FROM "ui.switch_thread" WHERE $timeFilter AND value
>>> > 1000 GROUP BY time($interval)
>>>
>>> What I would really like is a function that lets me calculate these
>>> graphs directly without using the WHERE clause, so I can combine all 6
>>> queries into one continuous query, and maintain these graphs directly in
>>> Influxdb:
>>>
>>> SELECT PERCENTAGE_BETWEEN(value, 0, 25),
>>>               PERCENTAGE_BETWEEN(value, 25, 50),
>>>               PERCENTAGE_BETWEEN(value, 50, 100),
>>>               PERCENTAGE_BETWEEN(value, 100, 1000),
>>>               PERCENTAGE_BETWEEN(value, 1000, 10000000000000)
>>> FROM "ui.switch_thread" WHERE $timeFilter;
>>>
>>> Would anyone else be interested in this function, or is there a way of
>>> calculating it without using the WHERE clause that already exists?
>>>
>>> Thanks,
>>>
>>> Conrad
>>>
>>> --
>>> Remember to include the InfluxDB version number with all issue reports
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "InfluxDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/influxdb.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/influxdb/4ca0848a-decd-461a-92df-9b1960d4ed9c%40googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> Sean Beckett
>> Director of Support and Professional Services
>> InfluxDB
>>
>> --
>> Remember to include the InfluxDB version number with all issue reports
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "InfluxDB" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/influxdb/45p0LvNyWjQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/influxdb.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/influxdb/CALGqCvMJHUmvXS%3DtXxUsSivkJbs%2B%2BZ%3DtYABMLS32U2-b0zYgYA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/influxdb/CALGqCvMJHUmvXS%3DtXxUsSivkJbs%2B%2BZ%3DtYABMLS32U2-b0zYgYA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> Remember to include the InfluxDB version number with all issue reports
> ---
> You received this message because you are subscribed to the Google Groups
> "InfluxDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/influxdb.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/influxdb/irclx6cd.14356290-5afa-42ae-87d1-f6bc868d5eca%40we.are.superhuman.com
> <https://groups.google.com/d/msgid/influxdb/irclx6cd.14356290-5afa-42ae-87d1-f6bc868d5eca%40we.are.superhuman.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Sean Beckett
Director of Support and Professional Services
InfluxDB

-- 
Remember to include the InfluxDB version number with all issue reports
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/CALGqCvPfoY144STw-Svxigj0fQM9dOtQFtMNjBYLzj99DHmvYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to