precision of floating point metering stats is discarded unnecessarily

Bug #1241467 reported by Eoghan Glynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Eoghan Glynn
Havana
Fix Released
Medium
Eoghan Glynn

Bug Description

Ceilometer returns aggregated statistical values as float, whereas the 'resource usage' panel narrows to int before inserting these data into the line chart.

For meters defined over a narrow range (such as cpu_util ranging from 0.0% to 100.0%) this has the effect of unnaturally smoothening the graph by discarding precision.

If it really was crucial that the line chart contain only ints, then the float->int conversion should be a round:

  i = int(round(f, 0))

as opposed to narrowing cast:

  i = int(f)

However, AFAICS there's no reason why these raw data couldn't be represented directly as floats in the line chart.

Tags: metering-ui
Eoghan Glynn (eglynn)
Changed in horizon:
assignee: nobody → Eoghan Glynn (eglynn)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/52603

Eoghan Glynn (eglynn)
tags: added: havana-backport-potential
David Lyle (david-lyle)
Changed in horizon:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/52603
Committed: http://github.com/openstack/horizon/commit/4b973c2fb49b3a1a0d38c3788f45b3af076625d0
Submitter: Jenkins
Branch: master

commit 4b973c2fb49b3a1a0d38c3788f45b3af076625d0
Author: Eoghan Glynn <email address hidden>
Date: Fri Oct 18 10:53:44 2013 +0100

    Avoid discarding precision of metering data

    Fixes bug 1241467

    Narrow-casting statistical aggregates to int before inserting
    into the resource usage line charts had the effect of unnaturally
    smoothening the trend. This was especially apparent for meters
    defined over a narrow range (such as cpu_util ranging from 0.0%
    to 100.0%).

    We now maintain floating point precision for these data.

    Change-Id: If6141a4f66aa0078d38aa9f53d913aca5684ad94

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/52868

Julie Pichon (jpichon)
Changed in horizon:
milestone: none → icehouse-1
Eoghan Glynn (eglynn)
tags: added: metering-ui
Alan Pevec (apevec)
tags: removed: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/havana)

Reviewed: https://review.openstack.org/52868
Committed: http://github.com/openstack/horizon/commit/d97bba1d0736cbf1c5a28d948854141b740111bb
Submitter: Jenkins
Branch: stable/havana

commit d97bba1d0736cbf1c5a28d948854141b740111bb
Author: Eoghan Glynn <email address hidden>
Date: Fri Oct 18 10:53:44 2013 +0100

    Avoid discarding precision of metering data

    Fixes bug 1241467

    Narrow-casting statistical aggregates to int before inserting
    into the resource usage line charts had the effect of unnaturally
    smoothening the trend. This was especially apparent for meters
    defined over a narrow range (such as cpu_util ranging from 0.0%
    to 100.0%).

    We now maintain floating point precision for these data.

    Change-Id: If6141a4f66aa0078d38aa9f53d913aca5684ad94
    (cherry picked from commit 4b973c2fb49b3a1a0d38c3788f45b3af076625d0)

Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.