Change in vdsm[master]: sampling: extract SampleWindow class

danken at redhat.com danken at redhat.com
Tue Nov 18 11:55:00 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: sampling: extract SampleWindow class
......................................................................


sampling: extract SampleWindow class

The existing AdvancedStatsFunction does actually
two different things: wraps a client-provided
callable, and implements a sliding window for samples.

This patch splits the two responsabilities.
Other than cleanup for the sake of clarity and testability,
future sampling refactoring patches will still
need to store samples and handle a sliding window;
but samples will be given instead of grabbed
(inversion of control, think the new libvirt bulk stats API)
so this also improve code reuse.

Change-Id: I48fe9e7f8ed3f5ec677d8f91a82cb70d0bdbb2e7
Signed-off-by: Francesco Romani <fromani at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/33783
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M tests/samplingTests.py
M vdsm/virt/sampling.py
2 files changed, 54 insertions(+), 33 deletions(-)

Approvals:
  Dan Kenigsberg: Looks good to me, approved
  Francesco Romani: Verified



-- 
To view, visit http://gerrit.ovirt.org/33783
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I48fe9e7f8ed3f5ec677d8f91a82cb70d0bdbb2e7
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list