L*      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  Safe-Inferred  None@OThis contains all the contextual information for a single benchmark run, which  makes up a row" in a table of benchmark results.  Note that multiple trials6 (actual executions) go into a single BenchmarkResult " Things like  SELFTIMED that should be monitored.  type Tags = [String] $A running subprocess. 'A stream of lines. (A stream of lines. )8Measured results from running a subprocess (benchmark). *"Contains the returned error code. -EBenchmark time in seconds, may be different than total process time. .Seconds /@A self-contained description of a runnable command. Similar to 4 System.Process.CreateProcess but slightly simpler. 1Executable and arguments 20Environment variables to APPEND to current env. 3Optional timeout in seconds. 4/Optional working directory to switch to before  running command. 59Different types of parameters that may be set or varied. 6QTakes CMD PATH, and establishes a benchmark-private setting to use PATH for CMD.  For example `CmdPath ghc  ghc-7.6.3`. J | Threads Int -- ^ Shorthand: builtin support for changing the number of 4 threads across a number of separate build methods. 75The name of the env var and its value, respectively. ) For now Env Vars ONLY affect runtime. 8KString contains compile-time options, expanded and tokenized by the shell. 9FString contains runtime options, expanded and tokenized by the shell. :NA BuildID should uniquely identify a particular (compile-time) configuration, O but consist only of characters that would be reasonable to put in a filename. 4 This is used to keep build results from colliding. =Which schedulerimplementationetc. >Set the number of threads. ?GA datatype for describing (generating) benchmark configuration spaces. A This is accomplished by nested conjunctions and disjunctions. P For example, varying threads from 1-32 would be a 32-way Or. Combining that  with profiling on/.off (product) would create a 64-config space. JWhile the ParamSetting provides an *implementation* of the behavior, this S datatype can also be decorated with a (more easily machine readable) meaning of Q the corresponding setting. For example, indicating that the setting controls  the number of threads. EThe target file or direcotry. F8Command line argument to feed the benchmark executable. G(The configration space to iterate over. J3This must be Just whenever doFusionUpload is true. M+The global configuration for benchmarking: PFWhat identifies this set of benchmarks? Used to create fusion table. Q2benchlist file name and version number (e.g. X.Y) R A list of #1threads to test. 0 signifies non-threaded mode. T%number of runs of each configuration Wkeep going after error XPaths to executables. ZSeconds since Epoch. [Where to put timing results. \*Where to put more verbose testing output. ]Branch, revision hash, depth. ^Starts with cabalmakeghc, can be extended by user. c:A global setting to control whether executables are given  their 'flags/params' after their regular arguments. * This is here because some executables don'#t use proper command line parsing. d6Line harvesters for SELFTIMED and productivity lines. gNA monad for benchamrking. This provides access to configuration options, but / really, its main purpose is enabling logging. hNA completely encapsulated method of building benchmarks. Cabal and Makefiles K are two examples of this. The user may extend it with their own methods. j)Identifies this build method for humans. ! , buildsFiles :: FilePredicate ' , canBuild :: FilePath -> IO Bool k"Can this method build a given file/ directory? l.More than one build can happen at once. This 7 implies that compile always returns StandAloneBinary. n#Clean any left-over build results. oSynthesize a list of compile/runtime settings that % will control the number of threads. p(The result of doing a build. Note that m3 can will throw an exception if compilation fails. qMIn this case the build return what you need to do the benchmark run, but the H directory contents cannot be touched until after than run is finished. r1This binary can be copied and executed whenever. sKA description of a set of files. The description may take one of multiple  forms. u Logical or. vLA common pattern. For example, we can build a file foo.c, if it lives in a  directory with exactly one Makefile. wE.g. Makefile ) | SatisfiesPredicate (String -> Bool) xE.g. .hs, WITH the dot. #Maps canonical command names, e.g. ghc, to absolute system paths. {#This function gives meaning to the FilePred type. # It returns a filepath to signal True and Nothing otherwise. |QMake a Benchmark data structure given the core, required set of fields, and uses @ defaults to fill in the rest. Takes target, cmdargs, configs. }VExhaustively compute all configurations described by a benchmark configuration space. ~+Is it a setting that affects compile time? MPerforms a simple reformatting (stripping disallowed characters) to create a N build ID corresponding to a set of compile flags. To make it unique we also  append the target path. NStrip all runtime options, leaving only compile-time options. This is useful ? for figuring out how many separate compiles need to happen. dA default value, useful for filling in only the fields that are relevant to a particular benchmark.   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~zysxwvut{prqhijklmno|CDEFG?BA@59876}~:;>=<MNOPQRSTUVWXYZ[\]^_`abcdefgHIJKL/01234),+*-.$%&'("#  !,   !"#$%&'(),+*-./0123459876:;>=<?BA@CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnoprqsxwvutyz{|}~None>There are three logging destinations we care about. The .dat $ file, the .log file, and the user's screen (i.e. the user who  launched the benchmarks). 3Print a message (line) both to stdout and logFile: 9Log a line to a particular file and also echo to stdout. NoneInternal data type. PThis runs a sub-process and tries to determine how long it took (real time) and K how much of that time was spent in the mutator vs. the garbage collector. It is complicated by:  L An additional protocol for the process to report self-measured realtime (a  line starting in  SELFTIMED)  Parsing the output of +RTS -s, to retrieve productivity OR using lines of  the form PRODUCTIVITY: XYZ  Note that +RTS -s is specific to Haskell/%GHC, but the PRODUCTIVITY tag allows = non-haskell processes to report garbage collector overhead. SThis procedure is currently not threadsafe, because it changes the current working  directory. &Check for a SELFTIMED line of output. 'Check for a line of output of the form TAG NUM or TAG: NUM. PRetrieve productivity (i.e. percent time NOT garbage collecting) as output from  a Haskell program with +RTS -s0. Productivity is a percentage (double between  0.0 and 100.0, inclusive). @Fire a single event after a time interval, then end the stream. This makes the EOS into an explicit,, penultimate message. This way it survives  concurrentMerge?. It represents this end of stream by Nothing, but beware the  doubly-nested  type. GAlternatioe to the io-streams version which does not allow setting the  environment.  None  In seconds. ,Global variable holding the main thread id. 1Create a thread that echos the contents of stdout/stderr InputStreams (lines) to A the appropriate places (as designated by the logging facility). NRun a command and wait for all output. Log output to the appropriate places.  The first argument is a tag. to append to each output line to make things  clearer. BRuns a command through the OS shell and returns stdout split into ( lines. (Ignore exit code and stderr.) BRuns a command through the OS shell and returns the first line of  output. 0Fork a thread but ALSO set up an error handler. A more persistent version of . 9Create a backup copy of existing results_HOST.dat files. NoneBuild with GNU Make. Build with GHC directly. Build with cabal. Checks whether a h works for a given file 5 matchesMethod :: BuildMethod -> FilePath -> IO Bool , matchesMethod BuildMethod{canBuild} path = ( return $ filePredCheck canBuild path COur compilation targets might be either directories or file names. PA simple wrapper for a command that is expected to succeed (and whose output we  don':t care about). Throws an exception if the command fails. None@The standard retry behavior when receiving HTTP network errors. HTakes an idempotent IO action that includes a network request. Catches  Cs and tries a gain a certain number of times. The second argument 4 is a callback to invoke every time a retry occurs. RTakes a list of *seconds* to wait between retries. A null list means no retries, R an infinite list will retry indefinitely. The user can choose whatever temporal 1 pattern they desire (e.g. exponential backoff). 9Once the retry list runs out, the last attempt may throw  ' exceptions that escape this function. RGet the table ID that has been cached on disk, or find the the table in the users 0 Google Drive, or create a new table if needed. AA representaton used for creating tables. Must be isomorphic to  2. This could perhaps be generated automatically. QConvert the Haskell representation of a benchmark result into a tuple for Fusion  table upload.  HIJKL HIJKLNoneCommand line flags. Command line options. Fill in static* fields of a FusionTable row based on the M data. NoneUSAGE 8Remove RTS options that are specific to -threaded mode. 4Build a single benchmark in a single configuration. 1Write the results header out stdout and to disk. -TODO: Eventually this will be parameterized. HIn this version, user provides a list of benchmarks to run, explicitly. OAn even more flexible version allows the user to install a hook which modifies R the configuration just before bencharking begins. All trawling of the execution P environment (command line args, environment variables) happens BEFORE the user  sees the configuration.  None  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-..//01234567899:;<=>?@ABCDEFGHIJKLLMNOPPQRSTTUVWXYZ[\]^_`abcdefghijklmnnopqrstuvwxyz{|}~      hsbencher-1.2HSBencher.TypesHSBencher.LoggingHSBencher.MeasureProcessHSBencher.UtilsHSBencher.MethodsHSBencher.FusionHSBencher.Config HSBencher.AppPaths_hsbencher HSBencherGenericPretty-1.2.1Text.PrettyPrint.GenericPrettydocBenchmarkResult _PROGNAME_VARIANT_ARGS _HOSTNAME_RUNID_THREADS _DATETIME_MINTIME _MEDIANTIME_MAXTIME_MINTIME_PRODUCTIVITY_MEDIANTIME_PRODUCTIVITY_MAXTIME_PRODUCTIVITY _ALLTIMES_TRIALS _COMPILER_COMPILE_FLAGS_RUNTIME_FLAGS _ENV_VARS_BENCH_VERSION _BENCH_FILE_UNAME _PROCESSOR _TOPOLOGY _GIT_BRANCH _GIT_HASH _GIT_DEPTH_WHO _ETC_ISSUE_LSPCI _FULL_LOG LineHarvester SubProcesswait process_out process_err RunResult ExitErrorTimeOut RunCompletedrealtime productivity CommandDescrcommandenvVarstimeout workingDir ParamSettingCmdPath RuntimeEnv CompileParam RuntimeParamBuildIDDefaultParamMeaning NoMeaningVariantThreads BenchSpaceSetOrAnd Benchmarktargetcmdargsconfigs FusionConfig fusionTableIDfusionClientIDfusionClientSecretConfig benchlist benchsetName benchversionthreadsettings maxthreadstrialsshortrundoClean keepgoing pathRegistryhostname startTime resultsFilelogFilegitInfo buildMethodslogOut resultsOutstdOutenvsargsBeforeFlags harvestersdoFusionUpload fusionConfigBenchM BuildMethod methodNamecanBuildconcurrentBuildcompileclean setThreads BuildResult RunInPlaceStandAloneBinary FilePredicateAnyFilePredOrInDirectoryWithExactlyOne IsExactly WithExtension CompileFlagsRunFlags filePredCheck mkBenchmarkenumerateBenchSpace isCompileTimetoCompileFlags toRunFlags toCmdPaths toEnvVars makeBuildIDcompileOptsOnlyemptyBenchmarkResultLogDestStdOutLogFile ResultsFileloglogOnmeasureProcess nullHarvesterselftimedHarvestertaggedLineHarvesterghcProductivityHarvestermy_namedefaultTimeout main_threadid parseIntListtrimstrBoolfst3snd3thd3isNumberindent runIgnoreErr echoStream runLoggedrunLinesrunSLcheckforkIOH getCPULoad fetchBaseName backupResults makeMethod ghcMethod cabalMethodstdRetry getTableIduploadBenchResult fusionSchema resultToTupleFlag ClientSecretClientID BenchsetName FusionTables ShowVersionShowHelpGHCPath CabalPath NumTrials KeepGoingShortRunNoCleanNoCabalNoRecompBinDirParBenchall_cli_optionsaugmentResultWithConfig getConfigdefaultMainWithBechmarksdefaultMainModifyConfigcatchIOversionbindirlibdirdatadir libexecdir getBinDir getLibDir getDataDir getLibexecDirgetDataFileName PathRegistryEnvVarstest1test2test3$fShowLineHarvester$fOutMap$fOutBenchmark$fOutBenchSpace$fOutDefaultParamMeaning$fOutFilePredicate$fOutParamSetting$fShowOutputStream$fShowBuildMethod$fShowBuildResult ProcessEvt timeOutStreamreifyEOSbase Data.MaybeMayberunInteractiveCommandWithEnv TimerFire ProcessClosedOutLineErrLineorMaybefilepath-1.3.0.1System.FilePath.Posix takeBaseNamegetDir runSuccessful inDirectory filesInDirretryIORequesthttp-conduit-1.9.4.1Network.HTTP.Conduit.Types HttpExceptioncore_cli_optionsfusion_cli_optionsusageStrpruneThreadedOpts compileOneprintBenchrunHeader defaultMain gc_stats_flagexedirpathrunOne whichVariantcatParallelOutputcollapsePrefix didCompletelogT hsbencher_tag shortArgsnest