textwrap icon indicating copy to clipboard operation
textwrap copied to clipboard

Show 95th percentile for latency in interactive demos

Open mgeisler opened this issue 4 years ago • 0 comments

We currently show the latency for the last wrapping done in cargo run --example interactive. It looks like this:

  Options:                                            Performance:
  - width: 75 (use ← and → to change)                 - build: release
  - break_words: false (toggle with Ctrl-b)           - words: 110
  - splitter: HyphenSplitter (cycle with Ctrl-s)      - characters: 593
  - algorithm: OptimalFit (toggle with Ctrl-o)        - latency: 212 usec

We could store the most recent measurements and show the 95th percentile latency instead of just showing the latest result.

We should then clear the histogram when the wrap options are changed — and perhaps also when enough text is typed?

mgeisler avatar Apr 21 '21 19:04 mgeisler