summary.cpp File Reference
#include <iostream>
#include <iomanip>
#include "interop/util/math.h"
#include "interop/util/length_of.h"
#include "interop/io/metric_file_stream.h"
#include "interop/logic/summary/run_summary.h"
#include "interop/util/option_parser.h"
#include "interop/version.h"
#include "inc/application.h"

Functions

void print_summary (std::ostream &out, const run_summary &summary, const size_t information_level, const bool csv_format)
 
int main (int argc, const char **argv)
 
template<typename I >
void print_array (std::ostream &out, I beg, I end, const size_t width, const char fillch)
 
template<size_t N>
void print_array (std::ostream &out, const char *(&values)[N], const size_t width, const char fillch)
 
template<size_t N>
void print_array (std::ostream &out, std::string(&values)[N], const size_t width, const char fillch)
 
void print_array (std::ostream &out, const std::vector< std::string > &values, const size_t width, const char fillch)
 
std::string format (const float val, const int width, const int precision, const float scale=1)
 
std::string format (const metric_stat &stat, const int width, const int precision, const float scale=1)
 
std::string format (const model::run::cycle_range &rng)
 
void summarize (const metric_summary &summary, std::vector< std::string > &values)
 
void summarize (const surface_summary &summary, std::vector< std::string > &values, const size_t lane)
 
void summarize (const lane_summary &summary, std::vector< std::string > &values)
 
std::string format_read (const run::read_info &read)
 

Function Documentation

std::string format ( const float  val,
const int  width,
const int  precision,
const float  scale = 1 
)

Format a floating point value to the given width and precision as a string

Parameters
valto format as a string
widthwidth of number
precisionnumber of values after decimal
scaleto divide number
Returns
string representation of value
std::string format ( const metric_stat stat,
const int  width,
const int  precision,
const float  scale = 1 
)

Format a struct of statistics to the given width and precision as a string

Parameters
statstruct to format as a string
widthwidth of number
precisionnumber of values after decimal
scaleto divide number
Returns
string representation of stat
std::string format ( const model::run::cycle_range rng)

Format cycle range as a string

Parameters
rngrange to format as a string
Returns
string representation of cycle range
std::string format_read ( const run::read_info read)
int main ( int  argc,
const char **  argv 
)
void print_array ( std::ostream &  out,
beg,
end,
const size_t  width,
const char  fillch 
)

Take a collection of strings and print them using a fixed width

Parameters
outoutput stream
begiterator to start of collection
enditerator to end of collection
widthof fill characters around string
fillchfill character (space by default)
void print_array ( std::ostream &  out,
const char *(&)  values[N],
const size_t  width,
const char  fillch 
)

Take a array of strings and print them using a fixed width

Parameters
outoutput stream
valuesarray of string values
widthof fill characters around string
fillchfill character (space by default)
void print_array ( std::ostream &  out,
std::string(&)  values[N],
const size_t  width,
const char  fillch 
)

Take a array of strings and print them using a fixed width

Parameters
outoutput stream
valuesarray of string values
widthof fill characters around string
fillchfill character (space by default)
void print_array ( std::ostream &  out,
const std::vector< std::string > &  values,
const size_t  width,
const char  fillch 
)

Take a vector of strings and print them using a fixed width

Parameters
outoutput stream
valuesvector of string values
widthof fill characters around string
fillchfill character (space by default)
void print_summary ( std::ostream &  out,
const run_summary summary,
const size_t  information_level,
const bool  csv_format 
)

Print the summary metrics to the given output stream

Parameters
outoutput stream
summarysummary metrics
information_levellevel of information to print
csv_formatif true, write in CSV format
void summarize ( const metric_summary summary,
std::vector< std::string > &  values 
)
void summarize ( const surface_summary summary,
std::vector< std::string > &  values,
const size_t  lane 
)
void summarize ( const lane_summary summary,
std::vector< std::string > &  values 
)