[英]Jmeter: format statistics data to have comma in HTML report
This is not something you can customize via JMeter Properties , you will have to do some JavaScript programming (not very complex thought)这不是你可以通过 JMeter Properties 自定义的东西,你将不得不做一些JavaScript编程(不是很复杂的想法)
Locate dashboard.js.fmkr
file under report-template\content\js
folder (lives in "bin" folder of your JMeter installation)在report-template\content\js
文件夹下找到dashboard.js.fmkr
文件(位于 JMeter 安装的“bin”文件夹中)
You will need to change 2 lines, as of JMeter 5.4.1 they are:您将需要更改 2 行,从 JMeter 5.4.1 开始,它们是:
Line # 194 which looks like: item = item.toFixed(2) + '%';
第 194 行看起来像: item = item.toFixed(2) + '%';
, you need to change it to: ,您需要将其更改为:
item = item.toFixed(2).toString().replace('.', ',') + '%';
Line # 213 which looks like: item = item.toFixed(2);
第 213 行看起来像: item = item.toFixed(2);
, similarly change it to: ,同样改成:
item = item.toFixed(2).toString().replace('.', ',')
Regenerate the dashboard and you should see the commas instead of dots. 重新生成仪表板,您应该看到逗号而不是点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.