Kevin Li
Kevin Li

Reputation: 1538

Multiplying two series with wildcards in graphite

I'm looking to optimize some pages in my web app by using graphite to identify bottlenecks.

My rough formula is something like weight = number_of_requests * response_time.

I have something like this at the moment - the first wildcard represents controller, and the second represents the action:

highestMax(
  multiplySeries(
    response_time.*.*.75percentile, 
    summarize(request.*.*.count, "1hour", "avg")
  ) 
5)

This doesn't work, I'm assuming because of the wildcards.

I tried to do some nested groupByNode magic, but that didn't seem to work either (how do I pass the value of the node to the callback in the second groupByNode?).

Upvotes: 2

Views: 1002

Answers (1)

Fiaz Hossain
Fiaz Hossain

Reputation: 21

I spent some time on this as well and eventually implemented multiplySeriesWithWildcards. See if it will fit your requirement. I sent a pull request for my change https://github.com/graphite-project/graphite-web/pull/634

Upvotes: 1

Related Questions