Skip to content

Conversation

@mlugg
Copy link
Contributor

@mlugg mlugg commented Jun 15, 2023

Resolves: #8

Sample output while running:

[mlugg@polaris poop]$ ./zig-out/bin/poop 'sleep 2' 'sleep 0.3564657983425769842579824567984236947654527985'
Benchmark 1 (3 runs): sleep 2:
  measurement      mean ± σ               min … max                   outliers         delta
  wall_time        2s ± 49.11us           2s … 2s                       0 ( 0%)        0%
  peak_rss         1M ± 45K               1M … 1M                       0 ( 0%)        0%
  cpu_cycles       436236 ± 18714         414747 … 448953               0 ( 0%)        0%
  instructions     208761 ± 8             208754 … 208769               0 ( 0%)        0%
  cache_references 16577 ± 621            15934 … 17174                 0 ( 0%)        0%
  cache_misses     6299 ± 428             5877 … 6732                   0 ( 0%)        0%
  branch_misses    2882 ± 38              2840 … 2914                   0 ( 0%)        0%
poop [2/2] 'sleep 0.356465798342576984257982456798423694765...' [4/14]

@andrewrk
Copy link
Owner

Let me ask you a difficult question... Does this progress indicator spark joy?

@dweiller
Copy link

dweiller commented Jun 16, 2023

I don't know for sure, but I suspect hyperfine is using the left n/8 block unicode characters to make a (relatively) smooth progress bar:

U+2588: █
U+2589: ▉
U+258A: ▊
U+258B: ▋
U+258C: ▌
U+258D: ▌
U+258E: ▎
U+258F: ▏

They should line use to make a solid line:

████
███▉
███▊
███▋
███▌
███▍
███▎
███▏

Formatting is a bit odd here (at least in my browser) but these look perfect in my terminal. I reckon these would spark joy, at least for the user.

@mlugg
Copy link
Contributor Author

mlugg commented Jun 16, 2023

Let me ask you a difficult question... Does this progress indicator spark joy?

It sure does in my heart! We could use an actual progress bar if you'd like, I just personally prefer the simplicity of this.

An ETA wouldn't be overly useful (the estimated total time is normally gonna be "the timeout you gave"), and personally I always find myself looking at progress numbers rather than bars. But maybe I'm the weird one here :D

@andrewrk
Copy link
Owner

andrewrk commented Jun 16, 2023

Alright I'm sold. But u got 32-bit compile errors

@mlugg
Copy link
Contributor Author

mlugg commented Jun 16, 2023

what compile errors? :)

@andrewrk andrewrk merged commit 369f433 into andrewrk:main Jun 16, 2023
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.

progress bar while user waits for results to be collected

3 participants