GithubHelp home page GithubHelp logo

Comments (5)

bcmills avatar bcmills commented on August 15, 2024 1

Rewording would help a little, but it's still confusing: if you say "Samples account for 14.50ms", how do you know the duration of each of those samples?

What does it mean to say the samples "account for 14.50ms" on a 2.5GHz CPU with 4-wide instruction dispatch (as is typical for modern AMD64 implementations)? Does that mean that the sampled instructions were the most recently dispatched instruction for each of 36,250,000 clock cycles? Does it mean that the instructions saturated the ALU for that many clock cycles? Something else entirely?

When you're dealing with a sample-based system, it's meaningful to talk about total times and fractions of the total sample. Fractions of the total time are nonsensical: it's like choosing 10 points along a 1-meter line and claiming that those points account for three centimeters of the line.

from pprof.

rauls5382 avatar rauls5382 commented on August 15, 2024

Each callstack in a profile is associated to a set of values. What is reported here is the sum of these values for all the callstacks in the profile, and is useful to understand the weight of individual frames over the full profile.

profile.proto is an unsampled format, so we in general do not have access to the number of samples collected.

from pprof.

bcmills avatar bcmills commented on August 15, 2024

My point is that the "sum" is the sum of a discrete number (a quantity of samples), not a continuous range (a time interval). Reporting the sums makes perfect sense, but reporting discrete numbers using continuous units is just plain confusing.

from pprof.

bcmills avatar bcmills commented on August 15, 2024

Or, to put it a different way: even if we don't have access to the number of samples, we should report the quantities in some unit that doesn't (erroneously) suggest continuity.

from pprof.

rauls5382 avatar rauls5382 commented on August 15, 2024

We're reporting the sum using the unit described in the profile.
Would you have a concrete suggestion for this example? Maybe just a rewording would help, like:

Duration: 1.60s, Samples account for 14.50ms (0.9%)

from pprof.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.