From: Jiri Olsa <jolsa@redhat.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>,
acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] perf, tools, script: Allow computing metrics in perf script
Date: Tue, 21 Nov 2017 22:28:25 +0100 [thread overview]
Message-ID: <20171121212825.GB28582@krava> (raw)
In-Reply-To: <20171121170714.GI28112@tassilo.jf.intel.com>
On Tue, Nov 21, 2017 at 09:07:14AM -0800, Andi Kleen wrote:
> On Tue, Nov 21, 2017 at 10:28:06AM +0100, Jiri Olsa wrote:
> > On Mon, Nov 20, 2017 at 08:03:06AM -0800, Andi Kleen wrote:
> > > > > Yes it is.
> > > > >
> > > > > It's for the complete sampling period because it is computed
> > > > > over the delta from the last sample to the previous sample.
> > > > >
> > > > > There isn't really a metric at a point, it is always over a interval.
> > > >
> > > > agreed, it's the count we meassured from the last sample.. but the
> > > > 'averaged' word above implies to me we compute some average over the
> > > > 'sampling' period, which we dont do
> > >
> > > Do you have a better word in mind?
> > >
> > > AFAIK average is the right word for this because it's the summary
> > > for that time period.
> >
> > the way I understand it is that we take the values from the current
> > sample and count the metric value.. so the phrase:
> >
> > .. the metric computed is averaged over the whole sampling period,
> > not just for the sample point ...
> >
> > does not make sense to me.. because we take the value of that
> > single 'sample point'.. I dont see any average sum in there
>
> The current samples contains the sum of event counts for a sampling period.
>
> EventA-1 EventA-2 EventA-3 EventA-4
> EventB-1 EventB-2 EventC-3
>
> gap with no events overflow
> |-----------------------------------------------------------------|
> period-start period-end
> ^ ^
> | |
> previous sample current sample
>
>
> So EventA = 4 and EventB = 3 at the sample point
>
> I generate a metric, let's say EventA / EventB. It applies
> to the whole period.
>
> But the metric is over a longer time which does not have the same
> behavior. For example the gap above doesn't have any events, while
> they are clustered at the beginning and end of the sample period.
>
> But we're summing everything together. The metric doesn't know
> that the gap is different than the busy period.
>
> That's what I'm trying to express with averaging.
I see, so averaging to express the sum of the uneven distribution
of the counts.. ook
thanks for bearing with me ;-)
jirka
next prev parent reply other threads:[~2017-11-21 21:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 21:42 Add fine grained sampled metrics for perf script Andi Kleen
2017-11-17 21:42 ` [PATCH v3 1/3] perf, tools, record: Synthesize unit/scale/... in event update Andi Kleen
2017-12-06 16:31 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-11-17 21:42 ` [PATCH v3 2/3] perf, tools, record: Synthesize thread map and cpu map Andi Kleen
2017-12-06 16:32 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-11-17 21:43 ` [PATCH v3 3/3] perf, tools, script: Allow computing metrics in perf script Andi Kleen
2017-11-20 9:04 ` Jiri Olsa
2017-11-20 15:35 ` Andi Kleen
2017-11-20 15:53 ` Jiri Olsa
2017-11-20 16:03 ` Andi Kleen
2017-11-21 9:28 ` Jiri Olsa
2017-11-21 17:07 ` Andi Kleen
2017-11-21 21:28 ` Jiri Olsa [this message]
2017-12-06 16:32 ` [tip:perf/core] perf script: Allow computing 'perf stat' style metrics tip-bot for Andi Kleen
2017-11-23 7:47 ` Add fine grained sampled metrics for perf script Jiri Olsa
2017-11-23 17:46 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171121212825.GB28582@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox