pub struct Pressure { /* private fields */ }Expand description
What every function a run allocated cost, in the order they were allocated.
Kept per function rather than as one total, because the number that matters is a hot loop and the way to find one in a file the size of an amalgamation is to sort the rows. The total is there too, since it is what a comparison of two builds is usually about and nobody should have to add up ten thousand lines to get it.
Implementations§
Source§impl Pressure
impl Pressure
Sourcepub fn merge(&mut self, other: &Self)
pub fn merge(&mut self, other: &Self)
Takes in everything another one recorded, which is how one file’s answer joins a run’s.
Sourcepub fn listing(&self) -> String
pub fn listing(&self) -> String
What -Zregister-pressure=FILE writes.
A comment holding the totals and then one line per function, each of them the three counts
and then the name. The counts come first because they are the fields a reader is sorting
on and the name is the one field that could be any length, which is the layout
-Zrule-coverage uses for the same reason.
Every function is listed, including the ones that spilled nothing, so that one of these files says how much of the module was measured as well as what the answer was. A build that stopped early and a build that spilled nowhere would otherwise look the same.