From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3Oc0-0005f9-BV for qemu-devel@nongnu.org; Fri, 12 Jun 2015 09:03:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z3Obw-0001yD-MF for qemu-devel@nongnu.org; Fri, 12 Jun 2015 09:03:08 -0400 From: Alberto Garcia Date: Fri, 12 Jun 2015 16:01:28 +0300 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 0/3] Add infrastructure to compute timed averages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Alberto Garcia , qemu-block@nongnu.org, Stefan Hajnoczi This series adds a new module that can be used to compute the average of a set of values in a certain period of time. This will be used by the accounting code to obtain statistics such as the min / max / average latency of I/O commands. This is based on BenoƮt's code, originally written last year. Regards, Berto Alberto Garcia (3): timer: Move NANOSECONDS_PER_SECONDS to timer.h timer: Use a single definition of NSEC_PER_SEC for the whole codebase util: Infrastructure for computing recent averages hw/ppc/ppc.c | 2 - hw/ppc/spapr_rtc.c | 3 +- hw/timer/mc146818rtc.c | 1 - hw/usb/hcd-ehci.c | 2 +- include/qemu/throttle.h | 2 - include/qemu/timed-average.h | 58 ++++++++++++ include/qemu/timer.h | 2 + tests/Makefile | 4 + tests/rtl8139-test.c | 10 +-- tests/test-throttle.c | 8 +- tests/test-timed-average.c | 89 ++++++++++++++++++ tests/wdt_ib700-test.c | 15 ++-- util/Makefile.objs | 1 + util/throttle.c | 4 +- util/timed-average.c | 208 +++++++++++++++++++++++++++++++++++++++++++ 15 files changed, 382 insertions(+), 27 deletions(-) create mode 100644 include/qemu/timed-average.h create mode 100644 tests/test-timed-average.c create mode 100644 util/timed-average.c -- 2.1.4