jlfwong / speedscope

🔬 A fast, interactive web-based viewer for performance profiles.
https://www.speedscope.app
MIT License
5.45k stars 237 forks source link

Fix trimTextMid #431

Closed jlfwong closed 1 year ago

jlfwong commented 1 year ago

There was a subtle bug in trimTextMid caused by calling substring methods with non-integer values. This happens because findValueBisect returns non-integer values, and there was no special handling of this.

The bug results in strings cutting off many of the last few characters in a string, rather than always displaying it when possible.

Before:

image

After:

image

Fixes #411

coveralls commented 1 year ago

Coverage Status

coverage: 42.978%. remained the same when pulling b2be6d60f13fc1f0610e4135cca5e7402c22838f on jlfwong/fix-trimTextMid into 693545b77abed8c135c8a90c3ab1d4e7d77d654d on main.