From owner-svn-src-all@FreeBSD.ORG Wed Aug 8 13:54:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C842C1065670; Wed, 8 Aug 2012 13:54:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3E268FC16; Wed, 8 Aug 2012 13:54:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q78DsQlx090371; Wed, 8 Aug 2012 13:54:26 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q78DsQJ4090369; Wed, 8 Aug 2012 13:54:26 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208081354.q78DsQJ4090369@svn.freebsd.org> From: Ed Maste Date: Wed, 8 Aug 2012 13:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239139 - head/tools/tools/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2012 13:54:26 -0000 Author: emaste Date: Wed Aug 8 13:54:26 2012 New Revision: 239139 URL: http://svn.freebsd.org/changeset/base/239139 Log: Round displayed pps (instead of truncating) Modified: head/tools/tools/netmap/pkt-gen.c Modified: head/tools/tools/netmap/pkt-gen.c ============================================================================== --- head/tools/tools/netmap/pkt-gen.c Wed Aug 8 09:42:44 2012 (r239138) +++ head/tools/tools/netmap/pkt-gen.c Wed Aug 8 13:54:26 2012 (r239139) @@ -1076,7 +1076,7 @@ main(int arc, char **argv) pps = toc.tv_sec* 1000000 + toc.tv_usec; if (pps < 10000) continue; - pps = (my_count - prev)*1000000 / pps; + pps = ((my_count - prev) * 1000000 + pps / 2) / pps; D("%" PRIu64 " pps", pps); prev = my_count; toc = now;