minimise round_timestamp calculations

Bug #1621510 reported by gordon chung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gnocchi
Fix Released
Wishlist
gordon chung

Bug Description

this is sort of related to bug 1621498.

basically, we are calculating round_timestamp quite a bit and more often then not for the same timestamps. for example, we calculate this for each aggregate+sampling but it should only be different per sampling[1]. similarly, it's the same timestamps for each split per sampling and same groupby times per sampling. this second case can probably be handled by bug 1621498.

i think it'd be good to start caching the results possibly?

[1] https://github.com/openstack/gnocchi/blob/b8a1172c7914d14eaa0979db69057f25fe4e162b/gnocchi/storage/_carbonara.py#L426-L427

Julien Danjou (jdanjou)
Changed in gnocchi:
status: New → Triaged
importance: Undecided → Wishlist
gordon chung (chungg)
description: updated
Changed in gnocchi:
assignee: nobody → gordon chung (chungg)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to gnocchi (master)

Reviewed: https://review.openstack.org/368226
Committed: https://git.openstack.org/cgit/openstack/gnocchi/commit/?id=8abc05b22ad541df3abe1cbe3200de5a5e9f3ce0
Submitter: Jenkins
Branch: master

commit 8abc05b22ad541df3abe1cbe3200de5a5e9f3ce0
Author: gord chung <email address hidden>
Date: Fri Sep 9 20:37:28 2016 +0000

    share groupings across aggregates

    this changes it so we don't compute a completely new series over
    and over for each aggregte when in reality, they are all the same.
    should save on round_timestamp calculations as well.

    Change-Id: I525fe97b2674eaf06c7170dce8d40523f15443da
    Closes-Bug: #1621498
    Closes-Bug: #1621510

Changed in gnocchi:
status: In Progress → Fix Committed
Julien Danjou (jdanjou)
Changed in gnocchi:
milestone: none → 3.0.0
status: Fix Committed → Fix Released
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.