oct.results package

Submodules

oct.results.models module

class oct.results.models.Result(*args, **kwargs)[source]

Bases: peewee.Model

Define a result model

DoesNotExist

alias of ResultDoesNotExist

custom_timers = <peewee.TextField object>
elapsed = <peewee.FloatField object>
epoch = <peewee.FloatField object>
error = <peewee.TextField object>
id = <peewee.PrimaryKeyField object>
scriptrun_time = <peewee.FloatField object>
to_dict()[source]
turret_name = <peewee.CharField object>
class oct.results.models.Turret(*args, **kwargs)[source]

Bases: peewee.Model

Define a turret model

DoesNotExist

alias of TurretDoesNotExist

cannons = <peewee.IntegerField object>
id = <peewee.PrimaryKeyField object>
name = <peewee.TextField object>
rampup = <peewee.IntegerField object>
save(*args, **kwargs)[source]
script = <peewee.TextField object>
status = <peewee.TextField object>
to_dict()[source]
updated_at = <peewee.DateTimeField object>
uuid = <peewee.TextField object>
oct.results.models.set_database(db_path, proxy, config)[source]

Initialize the peewee database with the given configuration

Parameters:
  • db_path (str) – the path of the sqlite database
  • proxy (peewee.Proxy) – the peewee proxy to initialise
  • config (dict) – the configuration dictionnary

oct.results.report module

class oct.results.report.ReportResults(run_time, interval)[source]

Bases: object

Represent a report containing all tests results

Parameters:
  • run_time (int) – the run_time of the script
  • interval (int) – the time interval between each group of results
compile_results()[source]

Compile all results for the current test

oct.results.writer module

class oct.results.writer.ReportWriter(results_dir, parent)[source]

Bases: object

A class representing a report, used to output the result

Parameters:
  • results_dir (str) – the output directory for the report
  • parent (str) – the parent directory
set_statics()[source]

Create statics directory and copy files in it

write_report(template)[source]

Write the compiled jinja template to the results file

Parameters:str (template) – the compiled jinja template

oct.results.ouput module

oct.results.stats_handler module

class oct.results.stats_handler.StatsHandler(output_dir, config)[source]

Bases: object

This class will handle results and stats comming from the turrets

Parameters:output_dir (str) – the output directory for the results
write_remaining()[source]

Write the remaning stack content

write_result(data)[source]

Write the results received to the database

Parameters:data (dict) – the data to save in database
Returns:None
write_turret(data)[source]

Write the turret information in database

Parameters:data (dict) – the data of the turret to save
Returns:The turret object after save

oct.results.graphs module

oct.results.graphs.get_local_time(index)[source]

Localize datetime for better output in graphs

Parameters:index (pandas.DateTimeIndex) – pandas datetime index
Returns:aware time objet
Return type:datetime.time
oct.results.graphs.resp_graph(dataframe, image_name, dir='./')[source]

Response time graph for bucketed data

Parameters:
  • dataframe (pandas.DataFrame) – dataframe containing all data
  • image_name (str) – the output file name
  • dir (str) – the output directory
Returns:

None

oct.results.graphs.resp_graph_raw(dataframe, image_name, dir='./')[source]

Response time graph for raw data

Parameters:
  • dataframe (pandas.DataFrame) – the raw results dataframe
  • image_name (str) – the output file name
  • dir (str) – the output directory
Returns:

None

oct.results.graphs.tp_graph(dataframe, image_name, dir='./')[source]

Throughput graph

Parameters:
  • dataframe (pandas.DataFrame) – dataframe containing all data
  • dir (str) – the output directory
Returns:

None

Module contents