API for Developers

Here you will find the API provide for developers.

Entry point

This is the main file for perprof

class perprof.main.PerProfSetup(args)

This is a class to store the files to be used.

perprof.main.main()

This is the entry point when calling perprof.

perprof.main.set_arguments(args)

Set all the arguments of perprof

File parse

Functions to parse the files

The files must be in the following format:

---
<Metadata 01>: <Value 01>
<Metadata 02>: <Value 02>
---
<Problem Name 01> <Exit Flag 01> <Cost 01>
<Problem Name 02> <Exit Flag 02> <Cost 02>
<Problem Name 03> <Exit Flag 03> <Cost 03>
...
perprof.parse.parse_file(filename, subset=None, success='c', mintime=0, maxtime=inf, free_format=False)

Parse one file.

Parameters:
  • filename (str) – name of the file to be parser
  • subset (list) – list with the name of the problems to use
  • success (list) – list with strings to mark sucess
  • mintime (int) – minimum time running the solver
  • maxtime (int) – maximum time running the solver
  • free_format (bool) – if False request that fail be mark with d
Returns:

performance profile data and name of the solver

Profile interface

The functions related with the perform (not the output).

class perprof.prof.Pdata(setup)

Store data for performance profile.

get_set_problems()

Get the set of problems to use.

Returns:list of problems
get_set_solvers()

Get the set of solvers to use.

Returns:list of solvers
plot()

This should be implemented by a child of this class.

scale()

Scale time.

set_percent_problems_solved_by_time()

Set the percent of problems solved by time.

perprof.prof.load_data(setup)

Load the data.

Parameters:setup (main.PerProfSetup) – the setup configurations

Profiler using TikZ

This handle the plot using tikz.

class perprof.tikz.Profiler(setup)

The profiler using TikZ.

plot()

Create the performance profile using matplotlib.

Profiler using matplotlib