k4bench.analysis.plots.heap¶
k4bench.analysis.plots.heap ¶
The heap a k4run job's components held, from its memory pass
(:class:~k4bench.analysis.heap.ComponentHeap): every component from
initialization through each event to finalization
(:func:plot_heap_timeline), and one component event by event
(:func:plot_component_heap_events). Values are in MB, as the
:mod:~k4bench.analysis.heap summaries give them.
format_mb ¶
value MB as a reader takes it in: GB from 1024 MB, kB below 0.1 MB, three significant digits, with its sign when signed.
Source code in k4bench/analysis/plots/heap.py
plot_heap_timeline ¶
plot_heap_timeline(held: DataFrame, before_first: Series, after_finalize: Series, named: list[str], *, colors: Mapping[str, str] | None = None, rss: Series | None = None, change: bool = False, warm_up: int | None = 0, steps: DataFrame | None = None, log_y: bool = False) -> Figure | None
The heap each series held, from initialization through each event to finalization.
held is events × series, in MB at each event's end, indexed by event
number: the job's components (execute["held_bytes"]) or groups of them,
:data:~k4bench.analysis.heap.NO_COMPONENT among them.
before_first and after_finalize are the same series' heap before the
first event and after the job's finalize.
Stacked, the named series are a band each, the most stable lowest; the
rest are one "Other (k)" band, and what no component allocated the lowest
band of all, both in neutral greys. The bands are opaque and set apart by
a gap in the surface colour; one wide enough at the last event carries its
name inside it there. A dashed line is rss, the anonymous RSS of the job
at each event's end (MB, indexed by event number) where given; the top of
the stack, the heap of the whole job, is in the hover. With change, each
of the named series is instead a line of what it held at each event's
end beyond what it held at the first event's end, so growth rises and a
step jumps, and the rest and what no component allocated are two grey
lines: together the lines make the whole heap's change, so growth in a
series not named still shows. colors maps a series to its colour; the others take the
default palette's colours but its grey, in order, which a caller drawing
more series than it has colours must not rely on. The
warm_up event is shaded. steps marks the events where a series
rose at once, one row each with its series, event_number and
step_mb (:meth:~k4bench.analysis.heap.ComponentHeap.steps): a
marker in the series' colour on the top of the stack, one for all of an
event's steps (in the largest's colour, every one in the hover), or on
the series' line with change (a step of a series not named is not
marked there). With log_y, the stack is drawn on a log axis reaching
below the lowest band, so the small bands under a large one stay
readable; it does not apply with change, whose lines cross zero.
None when there is nothing to draw.
Source code in k4bench/analysis/plots/heap.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | |
plot_component_heap_events ¶
plot_component_heap_events(start: Series, peak: Series, end: Series, *, before_first: float | None = None, after_finalize: float | None = None, color: str = _PALETTE[0], warm_up: int | None = 0) -> Figure | None
One component's heap event by event, in MB, each series indexed by
event number: a bar from what it held as the event started (start) up to
the most it held during it (peak), the event's working set, and a marker
at what it held at the event's end (end). What it held before the first
event and after finalize, where given, head the chart, so its axis spans
the events alone. Without peaks (a job that ran events at once), the bars
are left out and the marks drawn alone. The warm_up event is paler.
None when there is nothing to draw.