File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 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
@@ -368,15 +369,15 @@ runBenchmarksFun dir allBenchmarks = do
368
369
[ [ name,
369
370
show success,
370
371
show samples,
371
- show startup,
372
- show runSetup',
373
- show userWaits,
374
- show delayedWork,
375
- show $ firstResponse+ firstResponseDelayed,
372
+ showMs startup,
373
+ showMs runSetup',
374
+ showMs userWaits,
375
+ showMs delayedWork,
376
+ showMs $ firstResponse+ firstResponseDelayed,
376
377
-- Exclude first response as it has a lot of setup time included
377
378
-- Assume that number of requests = number of modules * number of samples
378
- show ((userWaits - firstResponse)/ ((fromIntegral samples - 1 )* modules)),
379
- show runExperiment,
379
+ showMs ((userWaits - firstResponse)/ ((fromIntegral samples - 1 )* modules)),
380
+ showMs runExperiment,
380
381
show rulesBuilt,
381
382
show rulesChanged,
382
383
show rulesVisited,
@@ -443,6 +444,9 @@ runBenchmarksFun dir allBenchmarks = do
443
444
lspTestCaps =
444
445
fullCaps {_window = Just $ WindowClientCapabilities (Just True ) Nothing Nothing }
445
446
447
+ showMs :: Seconds -> String
448
+ showMs = printf " %.2f"
449
+
446
450
data BenchRun = BenchRun
447
451
{ startup :: ! Seconds ,
448
452
runSetup :: ! Seconds ,
You can’t perform that action at this time.
0 commit comments