Adjust metering time units to sometime use a smaller unit

Bug #1384248 reported by Doug Fish
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Wishlist
Doug Fish

Bug Description

While reviewing https://review.openstack.org/#/c/96800 it seemed to me the code would sometimes select a larger time unit that people would normally use to describe the data.

Consider these 2 representations of 2 data sets

Data set 1a: 15 sec 30 sec 45 sec 30 sec 75 sec
Data set 1b: .2 min .5 min .7 min 1.2 min

Data set 2a : 1 day 2 days 3 days 10 days 13 days
Data set 2b: .1 weeks .3 weeks .4 weeks 1.4 weeks 1.9 weeks

IMO the "a" version is how people normally think about the data, yet the metering unit code will select "b".

Specifically I think the metering time unit selection code should not move to the next higher unit at 1 unit, but instead should convert at 2 or 3 units.

Doug Fish (drfish)
Changed in horizon:
assignee: nobody → Doug Fish (drfish)
summary: - Adjust metering units to sometime use a smaller unit
+ Adjust metering time units to sometime use a smaller unit
description: updated
Doug Fish (drfish)
description: updated
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/130336

Changed in horizon:
status: New → In Progress
David Lyle (david-lyle)
Changed in horizon:
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/130336
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=4f15492980d7573f17eb8a5a5584944ce54f2dac
Submitter: Jenkins
Branch: master

commit 4f15492980d7573f17eb8a5a5584944ce54f2dac
Author: Doug Fish <email address hidden>
Date: Wed Nov 19 20:44:43 2014 -0600

    Update metering unit selection to use smaller units for time

    Update the unit selection to not convert to a higher unit until
    the max value is at least 2 units.

    Change-Id: I349b328b553ed634a70b70b695d4db92295c9b67
    Closes-bug: #1384248

Changed in horizon:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → kilo-1
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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