timeShift Function doesn't graph all data when used inside sum() with wildcards

Reported by Nicholas Leskiw on 2010-11-17
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Graphite
Fix Released
High
chrismd

Bug Description

if using wildcards and timeShift() inside a sum()

for example:
sum(timeShift(graphite.servers.*.errors.java.*.count,"7d"))

two problems occur:
1. Only the first match to the wildcard is summed to itself (so if there's 42 metrics, you'll get a graph of the first metric with a scale of 42).
2. As more metrics match, the function takes exponentially more time to complete.

With 42 metrics, it takes nearly a minute to draw the graph (incorrectly).

A quick fix is to use timeShift() outside the sum(). Either this needs to be fixed so it works properly or an error should be thrown preventing a huge CPU drain and incorrect graphs being drawn.

chrismd (chrismd) on 2010-12-23
Changed in graphite:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → chrismd (chrismd)
chrismd (chrismd) on 2010-12-31
Changed in graphite:
status: Confirmed → Fix Committed
chrismd (chrismd) on 2011-01-18
Changed in graphite:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers