splot 0.3.1 → 0.3.2
raw patch · 2 files changed
+2/−13 lines, 2 files
Files
- Tools/SPlotMain.hs +1/−12
- splot.cabal +1/−1
Tools/SPlotMain.hs view
@@ -56,12 +56,6 @@ " -fromTime TIME - clip picture on left (time in same format as in trace)", " -toTime TIME - clip picture on right (time in same format as in trace)", " -numTracks NUMTRACKS - explicitly specify number of tracks when using '-stream true'",- " -stream true - use 'streaming mode' where the input is not loaded into memory and you",- " can process multi-gigabyte inputs.",- " In this mode, you MUST use an actual filename in '-if'.",- " Note that you better also indicate -fromTime, -toTime and -numTracks,",- " otherwise the data will be re-scanned once per each of these properties",- " that is not indicated.", " -colorscheme SCHEME COLORS - declare a color scheme (see note about colors at the end).", " SCHEME is an arbitrary string, e.g.: 'pale' or 'bright'.", " COLORS is a space-separated list of colors in SVG or hex, e.g. ",@@ -126,17 +120,12 @@ let cmpTracks = case getArg "sort" "time" args of { "time" -> comparing utcTime ; "name" -> comparing track } let expireTimeMs = read $ getArg "expire" "Infinity" args let phantomColor = case getArg "phantom" "" args of { "" -> Nothing; c -> Just (S.pack c) }- let streaming = case getArg "stream" "false" args of { "true" -> True; _ -> False } let readInput = if inputFile == "-" then B.getContents else B.readFile inputFile let readEvents = (map (parse parseTime . pruneLF) . B.lines) `fmap` readInput let colorMaps = [(S.pack scheme, map S.pack (words wheel)) | ("-colorscheme":scheme:wheel:_) <- tails args ] - when (streaming && (inputFile == "-")) $ error "In streaming mode (-stream true) you MUST use an actual filename in '-if'"- when (streaming && (isNothing fromTime || isNothing toTime || isNothing forcedNumTracks)) $ do- putStrLn "Warning: without all of -fromTime, -toTime, -numTracks, input will be scanned an extra time"-- pic <- renderEvents (RenderConf barHeight tickIntervalMs largeTickFreq expireTimeMs cmpTracks phantomColor fromTime toTime forcedNumTracks streaming colorMaps) readEvents+ pic <- renderEvents (RenderConf barHeight tickIntervalMs largeTickFreq expireTimeMs cmpTracks phantomColor fromTime toTime forcedNumTracks True colorMaps) readEvents renderableToPNGFile pic w h outPNG
splot.cabal view
@@ -1,5 +1,5 @@ Name: splot-Version: 0.3.1+Version: 0.3.2 License: BSD3 License-file: LICENSE Copyright: Eugene Kirpichov, 2010