aboutsummaryrefslogtreecommitdiff
path: root/src/benchmarks/realloc.py
blob: e5dae1b44013679415ebbb8ca4b0d3a569757c9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import matplotlib.pyplot as plt

from src.benchmark import Benchmark


class Benchmark_Realloc(Benchmark):
    def __init__(self):
        self.name = "realloc"
        self.descrition = """Realloc 100 times"""

        self.cmd = "realloc"

        self.args = {"oneshot": [1]}

        self.requirements = ["realloc"]
        super().__init__()

    def summary(self):
        # bar plot
        allocators = self.results["allocators"]

        self.barplot_single_arg("{task-clock}",
                                ylabel='"task-clock in ms"',
                                title='"realloc micro benchmark"')

        self.export_to_csv("task-clock")


realloc = Benchmark_Realloc()