<filename>analysis/experiments/flush_caches.py
from pandas import DataFrame

from analysis.tools.experiment import Experiment
from analysis.tools.test_instance import TestInstance


def _analyze(df: DataFrame, output_filename: str):
    # remove the size discovery run...
    df = df[df["//prepare/phase_1_bytes"] > 10000000]

    df = df[["when", "//sync/phase_2_ms"]]
    g = df.groupby("when").agg(["min", "max", "mean", "std"])

    with open(output_filename, "w") as f:
        f.write(str(g))


def flush_caches() -> Experiment:
    """
        commit a170cd4bb281c8fede073b32d1e85aedd437a501 (HEAD -> flush-caches, origin/flush-caches)
        Author: <NAME> <<EMAIL>>
        Date:   Fri Jul 30 13:05:42 2021 -0400

            flush caches
    """

    tag = "flush_caches"
    data_size = 1_000_000_000
    repeat = 3
    pattern = "Performance.KySync"
    similarity = 100
    threads = 32
    commitish = 'a0b70531fb56e467bd94175d317830184a4cba52'

    return Experiment([
        TestInstance(
            tag=f"{tag}-after",
            commitish=commitish,
            data_size=data_size,
            similarity=similarity,
            threads=threads,
            flush_caches=True,
            gtest_filter=pattern,
            gtest_repeat=repeat
        ),
        TestInstance(
            tag=f"{tag}-before",
            commitish=commitish,
            data_size=data_size,
            similarity=similarity,
            threads=threads,
            flush_caches=False,
            gtest_filter=pattern,
            gtest_repeat=repeat
        ),
    ], analyze=_analyze)

<filename>analysis/experiments/flush_caches.py
from pandas import DataFrame

from analysis.tools.experiment import Experiment
from analysis.tools.test_instance import TestInstance


def _analyze(df: DataFrame, output_filename: str):
    # remove the size discovery run...
    df = df[df["//prepare/phase_1_bytes"] > 10000000]

    df = df[["when", "//sync/phase_2_ms"]]
    g = df.groupby("when").agg(["min", "max", "mean", "std"])

    with open(output_filename, "w") as f:
        f.write(str(g))


def flush_caches() -> Experiment:
    """
        commit a170cd4bb281c8fede073b32d1e85aedd437a501 (HEAD -> flush-caches, origin/flush-caches)
        Author: <NAME> <<EMAIL>>
        Date:   Fri Jul 30 13:05:42 2021 -0400

            flush caches
    """

    tag = "flush_caches"
    data_size = 1_000_000_000
    repeat = 3
    pattern = "Performance.KySync"
    similarity = 100
    threads = 32
    commitish = 'a0b70531fb56e467bd94175d317830184a4cba52'

    return Experiment([
        TestInstance(
            tag=f"{tag}-after",
            commitish=commitish,
            data_size=data_size,
            similarity=similarity,
            threads=threads,
            flush_caches=True,
            gtest_filter=pattern,
            gtest_repeat=repeat
        ),
        TestInstance(
            tag=f"{tag}-before",
            commitish=commitish,
            data_size=data_size,
            similarity=similarity,
            threads=threads,
            flush_caches=False,
            gtest_filter=pattern,
            gtest_repeat=repeat
        ),
    ], analyze=_analyze)

# remove the size discovery run... commit a170cd4bb281c8fede073b32d1e85aedd437a501 (HEAD -> flush-caches, origin/flush-caches)         Author: <NAME> <<EMAIL>>         Date:   Fri Jul 30 13:05:42 2021 -0400              flush caches