我的输出没有显示完整的数字,但显示 ??反而
I'm trying to do benchmarking with JMH, the benchmarking result did come out but not perfectly
Somehow there's ?? in the numbers, is it the problem with my IDE where I need to set up the settings to show the full numbers or something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
JMH 输出使用扩展的 Unicode 字符。尤其, ? 10?? s/op”可能意味着“≈ 10⁻1⁰ s/op”。
要解决这个问题
The JMH output makes use of extended Unicode characters. In particular, ? 10?? s/op" probably means "≈ 10⁻¹⁰ s/op".
To solve it
您面临的是编码问题。
默认情况下,JMH 将其输出编码为 UTF-8,因此您将看到错误列的
±
,而不是那些??
,例如≈ 10⁻³
> 用于 Linux 或 Mac 上的分数列。在 Windows 上,终端支持 Unicode,但不完全支持,这就是为什么您会看到
??
而不是某些符号。要解决此问题,请按照另一个 SO 问题中描述的手册进行操作:如何在 Windows 命令行中使用 unicode 字符?What you are facing is an encoding issue.
JMH by default encodes its output as UTF-8 so instead of those
??
you'll see±
for Error column and e.g.≈ 10⁻³
for Score column on Linux or Mac.On Windows Unicode is supported in terminal but not entirely, this is why you see
??
instead of some symbols. To fix this please follow the manual described in another SO question: How to use unicode characters in Windows command line?