mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-14 19:30:57 +00:00
Parser profiling data: Nicer float format
No need to display three decimal points for the given cpu limit all the time. Will change outputs like: "1.728/10.000 seconds" to "1.728/10 seconds" Change-Id: Ib1f5b435825232eaf9fde7ff0d953c137c06ac32
This commit is contained in:
parent
704f1231d2
commit
8dbde85b69
|
@ -39,7 +39,8 @@ class Scribunto_LuaStandaloneEngine extends Scribunto_LuaEngine {
|
|||
$output->setLimitReportData( 'scribunto-limitreport-timeusage',
|
||||
[
|
||||
sprintf( "%.3f", $status['time'] / $this->getClockTick() ),
|
||||
sprintf( "%.3f", $this->options['cpuLimit'] )
|
||||
// Strip trailing .0s
|
||||
rtrim( rtrim( sprintf( "%.3f", $this->options['cpuLimit'] ), '0' ), '.' )
|
||||
]
|
||||
);
|
||||
$output->setLimitReportData( 'scribunto-limitreport-virtmemusage',
|
||||
|
|
Loading…
Reference in a new issue