How to use the perfplot.main.PerfplotData function in perfplot

To help you get started, we’ve selected a few perfplot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nschloe / perfplot / perfplot / main.py View on Github external
t, total_time = _b(data, kernel, repeat, timer, is_ns_timer, resolution)
                time_per_repetition = total_time / repeat

                remaining_time -= total_time
                repeat = int(remaining_time // time_per_repetition)
                if repeat > 0:
                    t2, _ = _b(data, kernel, repeat, timer, is_ns_timer, resolution)
                    t = min(t, t2)

                timings[k, i] = t

    except KeyboardInterrupt:
        timings = timings[:, :i]
        n_range = n_range[:i]

    data = PerfplotData(n_range, timings, flop, labels, colors, xlabel, title)
    return data

perfplot

Performance plots for Python code snippets

GPL-3.0
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis