Received: from eggs.gnu.org ([2001:4830:134:3::10]:57125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSN07-0004Bj-Jk for qemu-devel@nongnu.org; Mon, 02 Mar 2015 04:51:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSN06-0001lD-In for qemu-devel@nongnu.org; Mon, 02 Mar 2015 04:50:59 -0500 From: Markus Armbruster References: <1425064012-23155-1-git-send-email-dgilbert@redhat.com> Date: Mon, 02 Mar 2015 10:50:49 +0100 In-Reply-To: <1425064012-23155-1-git-send-email-dgilbert@redhat.com> (David Alan Gilbert's message of "Fri, 27 Feb 2015 19:06:50 +0000") Message-ID: <871tl7iv7q.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 0/2] RFC: Rolling statistics List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" Cc: amit.shah@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org, quintela@redhat.com Copying qemu-block, because it could be of interest for block I/O accounting. "Dr. David Alan Gilbert (git)" writes: > From: "Dr. David Alan Gilbert" > > Hi, > This is an attempt at a generic rolling statistics utility to > allow data (e.g. bandwidth usage, times etc) to be collected > easily. They hold some basic values (min/max/mean/weighted mean) > and the last 'n' raw values. I'd like to use this > maybe in fault-tolerance code. > > This is a first cut, and I think I probably need to rework it > as a qapi type somehow, but I'm interested in thoughts. > > Dave > > > Dr. David Alan Gilbert (2): > Rolling statistics utilities > Tests for rolling statistics code > > include/qemu/rolling-stats.h | 101 +++++++++++ > include/qemu/typedefs.h | 1 + > tests/Makefile | 3 + > tests/test-rolling-stats.c | 161 ++++++++++++++++++ > util/Makefile.objs | 1 + > util/rolling-stats.c | 393 +++++++++++++++++++++++++++++++++++++++++++ > 6 files changed, 660 insertions(+) > create mode 100644 include/qemu/rolling-stats.h > create mode 100644 tests/test-rolling-stats.c > create mode 100644 util/rolling-stats.c