File tree 1 file changed +11
-7
lines changed
1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ import System.FilePath ((<.>), (</>))
61
61
import System.Process
62
62
import System.Time.Extra
63
63
import Text.ParserCombinators.ReadP (readP_to_S )
64
+ import Text.Printf
64
65
charEdit :: Position -> TextDocumentContentChangeEvent
65
66
charEdit p =
66
67
TextDocumentContentChangeEvent
@@ -365,15 +366,15 @@ runBenchmarksFun dir allBenchmarks = do
365
366
[ [ name,
366
367
show success,
367
368
show samples,
368
- show startup,
369
- show runSetup',
370
- show userWaits,
371
- show delayedWork,
372
- show $ firstResponse+ firstResponseDelayed,
369
+ showMs startup,
370
+ showMs runSetup',
371
+ showMs userWaits,
372
+ showMs delayedWork,
373
+ showMs $ firstResponse+ firstResponseDelayed,
373
374
-- Exclude first response as it has a lot of setup time included
374
375
-- Assume that number of requests = number of modules * number of samples
375
- show ((userWaits - firstResponse)/ ((fromIntegral samples - 1 )* modules)),
376
- show runExperiment,
376
+ showMs ((userWaits - firstResponse)/ ((fromIntegral samples - 1 )* modules)),
377
+ showMs runExperiment,
377
378
show rulesBuilt,
378
379
show rulesChanged,
379
380
show rulesVisited,
@@ -439,6 +440,9 @@ runBenchmarksFun dir allBenchmarks = do
439
440
lspTestCaps =
440
441
fullCaps {_window = Just $ WindowClientCapabilities (Just True ) Nothing Nothing }
441
442
443
+ showMs :: Seconds -> String
444
+ showMs = printf " %.2f"
445
+
442
446
data BenchRun = BenchRun
443
447
{ startup :: ! Seconds ,
444
448
runSetup :: ! Seconds ,
You can’t perform that action at this time.
0 commit comments