Received: from eggs.gnu.org ([2001:4830:134:3::10]:57640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQxuh-00006y-1R for qemu-devel@nongnu.org; Mon, 08 Sep 2014 08:19:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQxuW-0003EE-2N for qemu-devel@nongnu.org; Mon, 08 Sep 2014 08:19:18 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:57756 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQxuV-0003Do-S7 for qemu-devel@nongnu.org; Mon, 08 Sep 2014 08:19:07 -0400 From: =?UTF-8?q?Beno=C3=AEt=20Canet?= Date: Mon, 8 Sep 2014 14:18:10 +0200 Message-Id: <1410178693-23370-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 v2 0/3] Add the infrastructure that will be used to compute I/O accouting averages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Beno=C3=AEt=20Canet?= Tiny module of code to maintain and compute timed average on a given peri= od. It comes with unit tests so we are sure the code will not bitrot while wa= iting for the accouting code to use it. in v2: Make NANOSECONDS_PER_SECONDS an integer [Peter, Eric] Change module's license [Eric] Add min and max computation [Beno=C3=AEt] Best regards 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: Add an utility infrastructure used to compute an average on a time slice include/qemu/throttle.h | 2 - include/qemu/timed-average.h | 49 +++++++++++++++ include/qemu/timer.h | 2 + tests/Makefile | 2 + tests/test-timed-average.c | 62 +++++++++++++++++++ util/Makefile.objs | 1 + util/throttle.c | 4 +- util/timed-average.c | 138 +++++++++++++++++++++++++++++++++++++= ++++++ 8 files changed, 256 insertions(+), 4 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.0