From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932663AbcEKQnf (ORCPT ); Wed, 11 May 2016 12:43:35 -0400 Received: from mail.kernel.org ([198.145.29.136]:35726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932162AbcEKQne (ORCPT ); Wed, 11 May 2016 12:43:34 -0400 Date: Wed, 11 May 2016 13:43:29 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Andi Kleen , peterz@infradead.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 06/10] perf, tools, stat: Avoid fractional digits for integer scales Message-ID: <20160511164329.GF20258@kernel.org> References: <1462489447-31832-1-git-send-email-andi@firstfloor.org> <1462489447-31832-7-git-send-email-andi@firstfloor.org> <20160507191038.GH19977@krava> <20160507192425.GA13997@two.firstfloor.org> <20160511130031.GA1032@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160511130031.GA1032@krava> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, May 11, 2016 at 03:00:31PM +0200, Jiri Olsa escreveu: > On Sat, May 07, 2016 at 12:24:25PM -0700, Andi Kleen wrote: > > > > if (csv_output) { > > > > - fmt = sc != 1.0 ? "%.2f%s" : "%.0f%s"; > > > > + fmt = floor(sc) != sc ? "%.2f%s" : "%.0f%s"; > > > > } else { > > > > if (big_num) > > > > - fmt = sc != 1.0 ? "%'18.2f%s" : "%'18.0f%s"; > > > > + fmt = floor(sc) != sc ? "%'18.2f%s" : "%'18.0f%s"; > > > > else > > > > - fmt = sc != 1.0 ? "%18.2f%s" : "%18.0f%s"; > > > > + fmt = floor(sc) != sc ? "%18.2f%s" : "%18.0f%s"; > > > > > > how about the rest of the code? we display % also in print_running > > > and print_noise_pct functions and maybe some place else > > > > For those it doesn't matter. In fact it's probably better there > > to always show the fractions. > > > > It is just confusing for metrics. > > ok, let's try and see, we can always follow up > with the rest if there's a need > > Acked-by: Jiri Olsa Missed this one, applied. - Arnaldo