File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ import Data.List
1111import Data.List.Split (splitOn )
1212import Data.Maybe
1313import Data.Time.Clock
14- -- import Data.Time.Format ()
14+ import Data.Time.Format
15+ import Data.Time.LocalTime
1516import Safe
1617import System.Console.Docopt
1718import System.Directory
@@ -132,14 +133,14 @@ defaultMain =
132133 when (null cmds) $ do
133134 out opts " No test commands found; provide some as arguments, with -f, or in ./bench.sh\n "
134135 exitSuccess
135- now <- getCurrentTime
136+ now <- getCurrentZonedTime
136137 out opts $ printf " Running %d tests %d times%s at %s:\n "
137138 (length cmds)
138139 (iterations opts)
139140 (case executables opts of
140141 [] -> " "
141142 es -> printf " with %d executables" (length es))
142- (show now)
143+ (formatTime defaultTimeLocale " %Y-%m-%d %T %Z " now)
143144 let
144145 exes = case executables opts of
145146 [] -> [" " ]
@@ -149,6 +150,12 @@ defaultMain =
149150 results <- mapM (runTestWithExes opts exes) cmds
150151 printSummary opts cmds exes cyc results
151152
153+ getCurrentZonedTime :: IO ZonedTime
154+ getCurrentZonedTime = do
155+ t <- getCurrentTime
156+ tz <- getCurrentTimeZone
157+ return $ utcToZonedTime tz t
158+
152159runTestWithExes :: Opts -> [String ] -> String -> IO [[Float ]]
153160runTestWithExes opts exes cmd = mapM (runTestWithExe opts cmd) exes
154161
You can’t perform that action at this time.
0 commit comments