• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

muesli / reflow / 7703176316
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: refactor/go-runewidth-to-uniseg
DEFAULT BRANCH: master
Ran 30 Jan 2024 05:01AM UTC
Jobs 1
Files 10
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Jan 2024 10:15PM UTC coverage: 100.0%. Remained the same
7703176316

Pull #71

github

mikelorant
Replace go-runewidth with uniseg

Replace the use of `RuneWidth` and `StringWidth` from `mattn/go-
runewidth` with equivalent functions from `rivo/uniseg`.

It is important to be aware that using `RuneWidth` will not be accurate
as the width of a rune cannot be determined in isolation. This requires
a shift to thinking about grapheme clusters instead.

Unfortunately due to the complexity of identifying grapheme clusters,
there has been some signifcant performance regressions in two
functions:

- PrintableRuneWidth: 10x slower
- TruncateString: 4x slower

Two other functions have had performance improvements:

- MarginString: 2x faster
- PaddingString: 2x faster

The documentation for `rivo/uniseg` mentions the use of `Step` and
`StepString` performing "orders of magnitude faster" than using the
`NewGraphemes` method. However, implementing these changes only
resulted in a 10% performance increase.

Signed-off-by: Michael Lorant <michael.lorant@nine.com.au>
Pull Request #71: Replace go-runewidth with uniseg

576 of 576 relevant lines covered (100.0%)

28.59 hits per line

Jobs
ID Job ID Ran Files Coverage
1 7703176316.1 30 Jan 2024 05:01AM UTC 10
100.0
GitHub Action Run
Source Files on build 7703176316
  • Tree
  • List 10
  • Changed 10
  • Source Changed 10
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #71
  • PR Base - master (#4435850961)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc