Merge lp://qastaging/~lapsu/graphite/holtwinters into lp://qastaging/~graphite-dev/graphite/main

Proposed by Matthew Graham
Status: Superseded
Proposed branch: lp://qastaging/~lapsu/graphite/holtwinters
Merge into: lp://qastaging/~graphite-dev/graphite/main
Diff against target: 288 lines (+221/-5)
2 files modified
webapp/content/js/composer_widgets.js (+3/-0)
webapp/graphite/render/functions.py (+218/-5)
To merge this branch: bzr merge lp://qastaging/~lapsu/graphite/holtwinters
Reviewer Review Type Date Requested Status
chrismd Needs Fixing
Review via email: mp+63881@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2011-09-22.

Description of the change

Holt-Winters Confidence Bands and Aberration Graph based on those confidence bands.
Applied this approach from RRDtool as render functions. http://www.usenix.org/events/lisa2000/full_papers/brutlag/brutlag_html/index.html

To post a comment you must log in.
Revision history for this message
chrismd (chrismd) wrote :

Wow, this looks terrific. Thank you for implementing this (and very cleanly I might add). This is also a great motivation for me to finally break out functions.py into a package instead of keeping it a gigantic module.

I'm in the process of digging out of a large backlog of graphite project duties so I may not get this merged in for a couple days but I will definitely merge it in for the next release.

Revision history for this message
chrismd (chrismd) wrote :

Sorry for the delayed response, I've finally reviewed your branch and the code definitely looks good but in testing I ran into a couple issues. First there seems to be a missing import of 'from datetime import timedelta' in functions.py as some of the new code uses timedelta. Second I got the following stacktrace when rendering http://graphite/render/?target=holtWintersForecast(carbon.agents.muon.avgUpdateTime)

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/opt/graphite/webapp/graphite/render/views.py", line 101, in renderView
    seriesList = evaluateTarget(requestContext, target)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 10, in evaluateTarget
    result = evaluateTokens(requestContext, tokens)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 21, in evaluateTokens
    return evaluateTokens(requestContext, tokens.expression)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 29, in evaluateTokens
    return func(requestContext, *args)
  File "/opt/graphite/webapp/graphite/render/functions.py", line 687, in holtWintersForecast
    analysis = holtWintersAnalysis(series, bootstrap)
  File "/opt/graphite/webapp/graphite/render/functions.py", line 614, in holtWintersAnalysis
    last_seasonal = getLastSeasonal(i)
  File "/opt/graphite/webapp/graphite/render/functions.py", line 569, in getLastSeasonal
    return bootstrap['seasonals'][j]
IndexError: list index out of range

Context from the last frame:
i = 0
j = -1440
season_length = 1440
seasonals = []
boostrap['seasonals'] = TimeSeries(name=seasonals, start=1310247240, end=1310330040, step=60)

review: Needs Fixing
Revision history for this message
Bill Wheatley (bwheatley) wrote :

Very useful change when it's finally implemented :)

Revision history for this message
chrismd (chrismd) wrote :

I'd be happy to re-review if anyone can fix the current issue. Once it passes a little testing it'll be merged into trunk.

398. By Matthew Graham <email address hidden>

merge holt winters into current progress

399. By Matthew Graham <email address hidden>

fix import and None problems in holt winters patch

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.