hsbencher-fusion-0.3.4: Backend for uploading benchmark data to Google Fusion Tables.

Safe HaskellNone
LanguageHaskell2010

HSBencher.Backend.Fusion

Contents

Description

Google Fusion Table upload of benchmark data.

This module must be used in conjunction with the main "hsbencher" package, e.g. "import HSBencher".

Synopsis

The plugin itself, what you probably want

defaultFusionPlugin :: FusionPlug Source

A default plugin. This binding provides future-proof way to get a default instance of the plugin, in the eventuality that more configuration options are added in the future.

Details and configuration options.

data FusionConfig Source

Configuration options for Google Fusion Table uploading.

Constructors

FusionConfig 

Fields

fusionTableID :: Maybe TableId

This must be Just whenever doFusionUpload is true.

fusionClientID :: Maybe String
 
fusionClientSecret :: Maybe String
 
serverColumns :: [String]

Record the ordering of columns server side.

stdRetry :: String -> OAuth2Client -> OAuth2Tokens -> IO a -> BenchM (Maybe a) Source

The standard retry behavior when receiving HTTP network errors. Note that this can retry for quite a long while so it is only to be usedfrom batch applications.

getTableId :: OAuth2Client -> String -> BenchM (TableId, [String]) Source

Get the table ID that has been cached on disk, or find the the table in the users Google Drive, or create a new table if needed.

In the case of a preexisting table, this function also performs sanity checking comparing the expected schema (including column ordering) to the sserver side one. It returns the permutation of columns found server side.

fusionSchema :: [(String, CellType)] Source

A representaton used for creating tables. Must be isomorphic to BenchmarkResult. This could perhaps be generated automatically (e.g. from a Generic instance, or even by creating a default benchmarkResult and feeding it to resultToTuple).

Note, order is important here, because this is the preferred order we'd like to have it in the Fusion table.

resultToTuple :: BenchmarkResult -> [(String, String)]

Convert the Haskell representation of a benchmark result into a tuple for upload to a typical database backend.

uploadBenchResult :: BenchmarkResult -> BenchM () Source

Upload the raw data, which had better be in the right format. uploadRawTuple :: [(String,String)] -> BenchM () uploadRawTuple tuple = do

Push the results from a single benchmark to the server.

data FusionPlug Source

The type of Fusion table plugins. Currently this is a singleton type; there is really only one fusion plugin.

data FusionCmdLnFlag Source

Parsed command line options provided by the user initiating benchmarking.