Skip to content

Modular, extensible status line via AbstractProgressElement - #369

Open
milankl-claude wants to merge 6 commits into
timholy:masterfrom
milankl-claude:mc/modular-progress-callbacks
Open

milankl-claude wants to merge 6 commits into
timholy:masterfrom
milankl-claude:mc/modular-progress-callbacks

Conversation

@milankl-claude

@milankl-claude milankl-claude commented Oct 3, 2026 •

Copy link
Copy Markdown

Implements the proposal from #357: the status line of every progress meter is assembled from elements that users can rearrange or extend, so custom information no longer requires overriding internals.

Closes #357

What changes for users

mutable struct MaxValue <: Elements.AbstractProgressElement
    data::Vector{Float64}
end
Elements.print_element(e::MaxValue, p) = " max = $(maximum(e.data))"

p = Progress(n; elements = (Elements.Description(), Elements.Percentage(),
                            Elements.Bar(), Elements.Colored(Elements.ETA(), :blue), MaxValue(data)))
  • AbstractProgressElement and print_element(element, p): besides the usual fields, p.tcurrent holds the time of the redraw and p.finished whether the meter is finished (both new fields of ProgressCore). print_element is only called when the meter is actually redrawn (throttled by dt), so elements can compute what they show on the fly.
  • Built-in elements: Description, Percentage, Bar, ETA, Speed, ElapsedTime, Counter, Threshold, Spinner. Plain strings act as separators. Colored(element, color) prints an element in its own color; all others use the meter's color.
  • With custom elements and barlen=nothing, Bar() fills whatever width the other elements leave, measured with textwidth. This replaces the fixed 29/14 column estimate.
  • Everything lives in src/elements.jl, in the exported submodule ProgressMeter.Elements. The submodule exports the element names, so using ProgressMeter.Elements brings them into scope on request, and generic names like Bar/Counter never clash otherwise.
  • A README section documents this ("Customizing the status line").

Non-breaking

  • When elements isn't passed (default nothing), the meters render the same layout as before. That layout is rebuilt on each redraw, so changes to p.showspeed and update!(p; desc=...) still take effect.
  • Golden-output tests (test/golden_cases.jl, test/golden_outputs.jl) were recorded on master (v1.11.0) before the refactor. They cover 13 configurations, including showspeed, barglyphs/barlen, start, max_steps, desc changes, showvalues with offset, cancel, colors, ProgressThresh and ProgressUnknown with spinner. The refactored code reproduces all of them byte for byte; only machine-dependent times and speeds are normalized.
  • The existing behaviour differences between meter types are preserved on purpose. In particular, only Progress skips the newline handling while IJulia clears output (guard_ijulia). Unifying that would be a reasonable follow-up, but it's out of scope here.
  • next! on the hot path still allocates nothing new; timings match master on my machine.

Refactor

As suggested in #357, the six copy-pasted format-and-print branches of _updateProgress! (running and finished, for each of the three meter types) are now a shared path:

  • render_line builds the line from the elements.
  • draw! prints it, together with the cursor movement, showvalues and keep. cancel uses it too.
  • draw_running! contains the timing logic.

The per-type _updateProgress! methods now only decide when to draw. Adding an option like #356's showelapsed/showeta then mostly means choosing elements.

Motivation: SpeedyWeather.jl currently pirates ProgressMeter.speedstring and uses global Refs to show simulation time, speed in simulated years/day, maximum wind speed and temperature range in its progress bar. With elements this becomes a set of types holding references to the simulation, which compute those diagnostics (and new ones, like a Courant number) only when the bar is redrawn.

Testing

  • The full test suite passes locally on Julia 1.13 with 4 threads and --check-bounds=yes, and test/test_elements.jl passes on Julia 1.10. The local-only timing assertion t_prog < 9*t_noprog in core.jl fails on my (noisy) machine for master as well, so I ran with CI=true.
  • New test/test_elements.jl:
    • golden outputs
    • custom elements, with print_element called only on redraw
    • setting p.elements after construction
    • elements on ProgressThresh/ProgressUnknown
    • bar width filling the line, fixed barlen, and two bars sharing the width

🤖 Generated with Claude Code

@MarcMush

MarcMush commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

@milankl if that's your PR please review it before submitting and make a human explanation to it

@milankl milankl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MarcMush, yes, after our discussion in #357 I had a discussion with Claude how to implement this in detail and this is what we came up with. I knew what we wanted from #357 but Claude helped me to figure out the details to map across ProgressThresh and ProgressUnknown (that I don't use) and wrote the tests. I normally review at least once also on github so that others have input on the discussion of the more critical points and can form their opinion instead of just seeing fully reviewed code.

Human summary: We introduce elements to the progress types to create a user interface for custom progress elements, especially those that depend on whatever is happening while a Progress is visualising that progress, e.g. some statistic of a big data analysis or a simulation. New elements just have to be <: AbstractProgressElement and have to extend the print_element function, as we wrote into the README. Furthermore all the current lines of code that concatenate the msg string of the progress line are rewritten using that interface now, which removes some duplicated code. I've highlighted some more specific points in the comments

Comment thread src/ProgressMeter.jl Outdated
Comment on lines +6 to +8
@static if VERSION >= v"1.11.0-DEV.469"
eval(Meta.parse("public AbstractProgressElement, ProgressStatus, print_element, Description, Percentage, Bar, ETA, Speed, ElapsedTime, Counter, Threshold, Spinner"))
end

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to make the new types only public after the current version, I let you decide how to export or make them public given changes to them afterwards would probably treated as breaking

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@milankl-claude why did you choose v"1.11.0-DEV.469"? v"1.11.0" is already released

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is the Julia dev build in which the public keyword was added, the cutoff that Compat.jl's @compat public uses too. Unlike v"1.11", it also covers the 1.11 alpha/beta/rc releases, which already parse public. In practice the two behave the same, so I can change it to v"1.11" if that reads better. The eval(Meta.parse(...)) is still needed because 1.10 cannot parse public.

Comment thread src/ProgressMeter.jl Outdated
"(12.34 ms/it)" to the description by setting `showspeed=true`.
To customize the status line pass a tuple of `elements`, e.g.
`elements=(ProgressMeter.Description(), ProgressMeter.Bar(), " ", MyElement())`,
see [`ProgressMeter.AbstractProgressElement`](@ref).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this only really does something when there's a properly built documentation but doesn't hurt to have a @ref already? @milankl-claude can you comment on this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, ProgressMeter has no Documenter build, so nothing resolves these links yet. They do no harm either: in the REPL ?Progress shows [X](@ref) as plain X, which I checked. I kept them so they work if docs are ever built, but I can turn them into plain code spans if you prefer.

Comment thread src/ProgressMeter.jl Outdated
done::Bool # is the task done?
spinner::Bool # show a spinner
spincounter::Int # counter for spinner
spinnerchars::Union{AbstractChar,AbstractString,AbstractVector{<:AbstractChar}} # spinner characters of the current update

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@milankl-claude Maybe worth introducing const SpinnerTypes = Union{...} here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in b41cfc3, const SpinnerTypes = Union{...}, used both for the field and for the spinner kwarg of _updateProgress!(::ProgressUnknown).

Comment thread src/ProgressMeter.jl Outdated
Comment on lines +253 to +257
struct ProgressStatus
t::Float64
elapsed::Float64
finished::Bool
end

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new type (created on the fly on every progress line update) was created as many progress elements depend on that information (e.g. to calculate percentage, the bar length etc) and so it allows a single argument in the print_element(..., ::ProgressStatus) API to define a custom progress element

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also with the finished field here any progress element can decide to print differently in print_element while running/when finished, e.g. to turn into some summary statistic instead of information of snapshot during progress. Like ETA turns into total time elapsed when finished.

Comment thread src/ProgressMeter.jl Outdated
whatever the element shows. Strings are elements that print themselves.
"""
function print_element end
print_element(s::AbstractString, ::AbstractProgress, ::ProgressStatus) = s

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@milankl-claude is this method actually used, if purely defined as fallback, mark that in a comment?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used, not only a fallback. The default layouts of ProgressThresh and ProgressUnknown contain string separators such as " " and " Time: ", and users can write e.g. elements = (Description(), " | ", Bar()). I added a comment in b41cfc3.

Comment thread src/ProgressMeter.jl
Comment on lines -322 to -326
msg = @sprintf "%s Time: %s (%d iterations)" p.desc dur p.counter
if p.showspeed
sec_per_iter = elapsed_time / p.counter
msg = @sprintf "%s (%s)" msg speedstring(sec_per_iter)
end

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR also removes these duplications across the update for Progress, ProgressTresh, ... see comment above that comments on similar/identical lines of code

Comment thread src/ProgressMeter.jl
Comment on lines -370 to -371
const spinner_chars = ['◐','◓','◑','◒']
const spinner_done = '✓'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved up to where Spinner element is defined, not removed

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small correction: they sit just above ProgressUnknown, whose constructor uses spinner_chars as its default, rather than next to Spinner. Doing that put them between the ProgressUnknown docstring and the struct, so ?ProgressUnknown showed nothing. Fixed in b41cfc3.

Comment thread test/golden_outputs.jl
Comment on lines +1 to +2
# Generated from ProgressMeter v1.11.0 output; the refactor must reproduce these exactly.
const GOLDEN_OUTPUTS = Dict(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Golden" here means non-breaking in terms of progress bar appearance -- I wouldn't consider this breaking if the progress bar looks different from one version to the other (in contrast to the user interface of constructing a progress) but here it serves to verify that the progress does indeed print the same as before. You may want to take these tests out before merging as you'd otherwise get a failure in the future if you decide to change the appearance ... happy to leave it or to disable these tests

Comment thread README.md
elements = (ProgressMeter.Description(), ProgressMeter.Percentage(),
ProgressMeter.Bar(), ProgressMeter.ETA(), MaxValue(data)))
for i in eachindex(data)
data[i] = i / 10

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@milankl-claude maybe make it clear here (or in the paragraph above) that because the progress element was externally defined with a pointer to some data, that information can now be easily included as an element into the progress line, otherwise it seems a bit confusing of why you do data[i] = i / 10 here. While it's nice to have some customization on the progress line of course, the overall motivation is to print information that depends on whatever is happening (e.g. some big computation) while the progress bar visualises its progress

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in b41cfc3. A paragraph before the example now explains that the element holds a reference to the data being computed, so each redraw shows its current state, and that this is the main use case.

Comment thread README.md Outdated
| `Threshold()` | `(thresh = 0.1, value = 0.5)` | `ProgressThresh` |
| `Spinner()` | a spinning character | `ProgressUnknown` |

Without `elements` the layout is the same as before and determined by `desc`, `showspeed`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@milankl-claude given this is a readme "before" is likely relative, so maybe just give an example for Progress and say this would correspond to elements = (...) during construction?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in b41cfc3. The README now shows that Progress(n; showspeed=true) corresponds to elements = (Description(), Percentage(), Bar(), ETA(), Speed()), and notes that only the bar length can differ by a few characters (estimated vs measured width).

@MarcMush

MarcMush commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Here are some thoughts (open to discussion of course)

the Elements can be in a different file to reduce the size of the main file and to try to simplify
maybe even their own module which could be exported, then it would be Element.ETA instead of ProgressMeter.ETA (or Template? ProgressElement? ...)

Could we call it templates? still made of elements, which means a template is made of elements

I wonder if we can remove some fields in Progress[Core] and put them in the corresponding element (assuming noone is using these, or it will be like #304), for example:

function default_elements(p::Progress, showspeed, showeta, showelapsed, check_iterations)
    elements = (Description(), Percentage(), Bar(true))
    elements = p.showspeed ? (elements..., Speed(check_iterations)) : elements
    elements = p.showeta ? (elements..., ETA(check_iterations)) : elements
    elements = p.showelapsed ? (elements..., Elapsed()) : elements
    return elements
end

We should have a way to colour each element a different color, or even multiple colors in a single element ? (#361).
See print_colored for reference
maybe each element can return a color and then goes to print_colored
or we add color-changing elements, example for default: (Element.Color(:green), template..., Element.DisableColor())
In #361 this would be a annoying because the bar would need to be 2 elements
simple elements should not have to worry about color, so not sure how to handle that
maybe saying that each element can have one color only is good enough

ProgressStatus feels redundant, maybe we can add tcurrent and finished in ProgressCore

maybe show_values could also be included in the template? would this mean we should be able to change other elements with update!(p; kwargs...) ?

we should have a way of disabling escape characters for text output or basic terminals (#151, #222, #223)

These are big design decision, I would like to have other maintainers thoughts @timholy @IanButterworth

@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.44961% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.14%. Comparing base (edddb8d) to head (1d42b69).

Files with missing lines Patch % Lines
src/ProgressMeter.jl 98.03% 1 Missing ⚠️
src/elements.jl 98.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #369      +/-   ##
==========================================
- Coverage   96.39%   96.14%   -0.26%     
==========================================
  Files           3        4       +1     
  Lines         610      596      -14     
==========================================
- Hits          588      573      -15     
- Misses         22       23       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MarcMush

MarcMush commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

I also wonder what's the best way of constructing the progressbar

The status line of all progress meters is now assembled from elements
(Description, Percentage, Bar, ETA, Speed, ...) rendered by one shared
code path instead of six format strings. Users can pass their own
elements to customize what is shown without overriding internals (timholy#357).
The default layout is unchanged, checked byte for byte by new golden
output tests recorded from v1.11.0.
…ssUnknown docstring

The spinner constants sat between the ProgressUnknown docstring and the
struct, so the docstring was attached to spinner_chars instead.
…to ProgressCore, Colored element

- Move elements, default_elements and render_line to src/elements.jl, inside an exported
  submodule Elements that exports the element names
- Remove ProgressStatus: ProgressCore gets tcurrent and finished, set before each redraw;
  print_element(element, p) now takes two arguments
- Add Elements.Colored(element, color); render_line returns text => color segments, merged
  when neighbours share a color, so the default output is unchanged
- printover styles the segments into a buffer and writes the line at once
@milankl-claude
milankl-claude force-pushed the mc/modular-progress-callbacks branch from 44b4664 to 5bdde06 Compare October 5, 2026 12:03
@milankl-claude

Copy link
Copy Markdown
Author

Thanks for the thorough review, @MarcMush! Here's every suggestion from your two comments, with what I did or what I'd propose. The changes are in 5bdde06. (I also force-pushed the branch to fix the author of the earlier commits, which had been committed under milankl's git identity by mistake. The code is unchanged.)

Done in this PR

  • Elements in their own file: they're now in src/elements.jl, which also holds default_elements and render_line. src/ProgressMeter.jl shrinks by about 200 lines.
  • Their own exported module: ProgressMeter.Elements is exported, so you write Elements.ETA(), Elements.Bar(), etc. The module exports its element names, so using ProgressMeter.Elements lets you write plain ETA(), but only for code that opts in. That avoids the Bar/Counter name clashes that kept them unexported before. The version-gated public hack is gone as well. I picked the plural Elements to follow the usual module naming (Iterators, Threads). Element is a one-word change if you prefer it.
  • Merge ProgressStatus into ProgressCore: done, and it caused no complications. ProgressCore now has tcurrent (the time() of the redraw) and finished. Both are set immediately before each redraw (finished = false in draw_running!, true in draw_finished!), so they mean exactly what the struct fields meant. The API is down to two arguments, print_element(element, p). Elapsed time is p.tcurrent - p.tinit. One alternative was an isfinished(p) function built on counter >= n / triggered / done, but a field was the safer choice. A forced update! on a ProgressThresh that has already triggered still draws the running line, and with the function it would have switched to the finished text.
  • Colors per element: I went with your "one color per element" option, through a wrapper, so simple elements never deal with color:
    using ProgressMeter.Elements
    Progress(n; elements = (Colored(Description(), :blue), Percentage(), Bar(), Colored(ETA(), :light_black)))
    Unwrapped elements use p.color, so color= in update!/next! still works. A color can be a Symbol or an Int (0–255), as in printstyled. render_line now returns text => color segments, and neighbouring segments with the same color are merged. As a result the default output is still byte-identical to master, colored golden test included. I preferred this to Color(:green)/DisableColor() marker elements: with markers, the color state lives in the position within the tuple, and then removing or reordering an element changes the color of the elements that follow it.

Construction of the line (your second comment)

render_line only runs on a redraw, at most once every dt, never on the next! hot path, which still doesn't allocate. So the few small strings it allocates are negligible next to the terminal I/O. The part that matters for slow terminals is the number of writes. printover now styles all the segments into an IOBuffer and writes the line with a single write. Before, it made separate print/printstyled calls, and a colored line would have meant one per segment. This is the #245 idea applied to the status line. To extend it to the whole frame (cursor movement plus showvalues), only draw! would need to change, since it now does all the drawing for every meter type. I left that out of this PR because of the IJulia path: clear_output and the byte-count reset in printover assume the output has already been written, so the reordering needs care. It would make a good small follow-up that also closes #245.

Open for discussion / proposed follow-ups

  • "Templates" naming: no strong opinion. I'd keep elements for the keyword and the module, since a tuple of elements is all a template would be. If you and the other maintainers prefer template = (...), that's a rename of the keyword and nothing else.
  • Moving showspeed etc. from ProgressCore into elements: I agree with the direction. Building the default tuple once at construction (your default_elements(p, showspeed, showeta, showelapsed, ...)) would make p.elements always a tuple and give Add showelapsed and showeta options to Progress #356 a natural home. I'd still do it in a follow-up for two reasons. First, p.showspeed is a mutable field today, and Bar(true)'s legacy width estimate reads it, so removing it is the Drop Julia <1.6. Reduce code duplication by introducing ProgressCore #304-type breakage you mention. Second, check_iterations is the redraw-throttling predictor and isn't tied to any element, so it should stay in the core. Keeping this PR non-breaking makes it easier to review.
  • showvalues as elements / changing elements via update!: showvalues are extra lines below the meter, while elements make up one line, so I'd keep the two separate for now. You can already swap the elements on a meter with p.elements = (...). User elements are mutable objects that the caller holds on to, so for those, updating the element itself is the natural way to change what's shown, rather than passing kwargs to update!. An elements= kwarg on update! would be trivial to add if wanted.
  • Disabling escape characters (Ugly printing on server (question) #151, Implemented SimpleProgress suitable for output to file #222, Progressmeter for output to file #223): this is now much easier than before. render_line is pure text with no escape codes, and draw!/printover is the only place where \r, \e[K, cursor movement and color are emitted. A plain-text mode (e.g. one println per redraw, without color) would be a branch in draw!. It's a separate feature, so I'd prefer it as a follow-up.
  • Multi-colored bar (Using Julia 1.12 cool new progress bar with ProgressMeter.jl #361): one color per element can't color the filled and empty parts of the bar differently. Since segments are now text => color pairs, a follow-up could let Bar emit two segments, with Bar(; color_filled, color_empty) for example, without touching the element API.

Tests: the golden outputs (all 13 cases, colored one included) and the new color tests pass. The full suite passes locally on Julia 1.13 with 4 threads, --check-bounds=yes and CI=true.

@milankl

milankl commented Oct 5, 2026

Copy link
Copy Markdown

Agree with most of your points @MarcMush, but not sure about "templates", a template would be a typical progress line one would start from and then only make few changes to it, but given that the elements are now an immutable tuple, I don't really see the idea of them being a "template". Hence I continue to prefer Progress(..., elements = (a, b, c)) to define the progress line. One could "name" some typical element collections like description-percentage, description-eta-speed, but that defeats the point of modularity somewhat as the presence of templates sounds like you couldn't make up your own progress line easily!

The discussion on what to do with showspeed I leave to you, for me a breaking change is fine, but I understand that's not desirable so retaining showspeed/showeta etc as they currently sound like the only possible middle ground now.

Some of the other points mentioned should probably get their own PR to not grow this too much.

milankl-claude and others added 2 commits October 5, 2026 13:11
…hmarks (timholy#370)

Resolve conflicts by keeping the shared draw! path of this PR and porting master's
print_repeat into draw!; printover colors segments with printcolored, which now also
takes Int colors for Elements.Colored.
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Benchmark Results (Julia v1)

Time benchmarks
master 5f5f073... master / 5f5f073...
singlethreaded/with automatic lock 0.217 ± 0.00031 s 0.144 ± 0.0015 s 1.5 ± 0.016
singlethreaded/with disabled 21.1 ± 0.035 ms 21.1 ± 0.028 ms 1 ± 0.0021
singlethreaded/with force 0.384 ± 0.13 ms 0.385 ± 0.1 ms 0.998 ± 0.42
singlethreaded/with lock 0.539 ± 0.0014 s 0.318 ± 0.0027 s 1.69 ± 0.015
singlethreaded/with lock, disabled 0.224 ± 0.0014 s 0.223 ± 0.002 s 1.01 ± 0.011
singlethreaded/with no printing 0.217 ± 0.0047 s 0.149 ± 0.0018 s 1.46 ± 0.036
singlethreaded/with progress 0.196 ± 0.00018 s 0.148 ± 0.00065 s 1.32 ± 0.0059
singlethreaded/without progress 11.7 ± 0.021 ms 11.7 ± 0.028 ms 0.999 ± 0.003
threaded/with automatic lock 0.504 ± 0.12 s 0.436 ± 0.0073 s 1.16 ± 0.27
threaded/with disabled 0.31 ± 0.012 s 0.309 ± 0.011 s 1 ± 0.053
threaded/with force 0.745 ± 0.13 ms 0.578 ± 0.051 ms 1.29 ± 0.25
threaded/with forced lock 0.491 ± 0.0076 s 0.439 ± 0.0042 s 1.12 ± 0.02
threaded/with no printing 0.498 ± 0.0038 s 0.431 ± 0.0025 s 1.16 ± 0.011
threaded/without progress 0.218 ± 0.018 s 0.218 ± 0.019 s 0.998 ± 0.12
time_to_load 0.0343 ± 0.00018 s 0.0347 ± 0.0005 s 0.987 ± 0.015
Memory benchmarks
master 5f5f073... master / 5f5f073...
singlethreaded/with automatic lock 0.497 k allocs: 26.3 kB 1.08 k allocs: 0.0442 MB 0.581
singlethreaded/with disabled 10 allocs: 0.453 kB 10 allocs: 0.469 kB 0.967
singlethreaded/with force 0.453 k allocs: 24.1 kB 1.53 k allocs: 0.0623 MB 0.377
singlethreaded/with lock 1.21 k allocs: 0.0615 MB 2.45 k allocs: 0.099 MB 0.621
singlethreaded/with lock, disabled 10 allocs: 0.453 kB 10 allocs: 0.469 kB 0.967
singlethreaded/with no printing 10 allocs: 0.453 kB 10 allocs: 0.469 kB 0.967
singlethreaded/with progress 0.453 k allocs: 24.1 kB 1.15 k allocs: 0.0471 MB 0.501
singlethreaded/without progress 1 allocs: 16 B 1 allocs: 16 B 1
threaded/with automatic lock 1.09 k allocs: 0.0555 MB 3.22 k allocs: 0.13 MB 0.426
threaded/with disabled 23 allocs: 1.27 kB 23 allocs: 1.28 kB 0.988
threaded/with force 0.466 k allocs: 24.9 kB 1.54 k allocs: 0.0631 MB 0.385
threaded/with forced lock 1.09 k allocs: 0.0555 MB 3.3 k allocs: 0.133 MB 0.417
threaded/with no printing 23 allocs: 1.27 kB 23 allocs: 1.28 kB 0.988
threaded/without progress 14 allocs: 0.812 kB 14 allocs: 0.812 kB 1
time_to_load 0.196 k allocs: 11.5 kB 0.196 k allocs: 11.5 kB 1

@milankl

milankl commented Oct 28, 2026

Copy link
Copy Markdown

@MarcMush ping. Is there more I can do to get this merged?

@milankl

milankl commented Nov 6, 2026

Copy link
Copy Markdown

ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Modularity and extensibility of printed information

3 participants