Received: from eggs.gnu.org ([2001:4830:134:3::10]:40894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWoPj-0000HT-GQ for qemu-devel@nongnu.org; Wed, 24 Sep 2014 11:23:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWoPb-0005PT-E3 for qemu-devel@nongnu.org; Wed, 24 Sep 2014 11:23:31 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:56179 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWoPb-0005NY-1t for qemu-devel@nongnu.org; Wed, 24 Sep 2014 11:23:23 -0400 From: =?UTF-8?q?Beno=C3=AEt=20Canet?= Date: Wed, 24 Sep 2014 17:21:02 +0200 Message-Id: <1411572065-18072-1-git-send-email-benoit.canet@nodalink.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v3 0/3] timed average infrastructure for use in block statistics List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, armbru@redhat.com, =?UTF-8?q?Beno=C3=AEt=20Canet?= , peter.maydell@linaro.org Hi, Here is the new iteration of the timed average module. A better algorithm avoiding unwanted noise has been implemented and the t= est have been rewritten as suggested. Best regards in V3: Add Eric rev by of patch 2 drop unneeded (double) casts [Eric] Implement new algorithm [Paolo] rewrite commit message [Markus] stub cpu_get_clock in tests [Paolo] Beno=C3=AEt Beno=C3=AEt Canet (3): throttle: Make NANOSECONDS_PER_SECOND an integer timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse util: Infrastructure for computing recent averages include/qemu/throttle.h | 2 - include/qemu/timed-average.h | 60 +++++++++++++ include/qemu/timer.h | 2 + tests/Makefile | 2 + tests/test-timed-average.c | 89 ++++++++++++++++++ util/Makefile.objs | 1 + util/timed-average.c | 208 +++++++++++++++++++++++++++++++++++++= ++++++ 7 files changed, 362 insertions(+), 2 deletions(-) create mode 100644 include/qemu/timed-average.h create mode 100644 tests/test-timed-average.c create mode 100644 util/timed-average.c --=20 2.1.1