nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f13afe2
)
perf analysis: customize float precision in reports
author
Alexis Laferrière
<alexis.laf@xymus.net>
Tue, 14 Nov 2017 16:47:50 +0000
(11:47 -0500)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Mon, 27 Nov 2017 23:57:25 +0000
(18:57 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/performance_analysis.nit
patch
|
blob
|
history
diff --git
a/lib/performance_analysis.nit
b/lib/performance_analysis.nit
index
b9e436a
..
61f0186
100644
(file)
--- a/
lib/performance_analysis.nit
+++ b/
lib/performance_analysis.nit
@@
-60,9
+60,14
@@
class PerfMap
return ts
end
+ # Number of digits to the right of the decimal points in reports created by `to_s`
+ #
+ # Defaults to 4.
+ var precision = 4 is writable
+
redef fun to_s
do
- var prec = 3
+ var prec = precision
var table = new Map[String, Array[String]]
for event, stats in self do