cijoe_extractors/rocksdb_db_bench.py
def extract_metrics(tcase: TestCase) -> List[dict]:
    """
    Locate testcase db_bench files and parse them.
    Writes metrics to aux_root/metrics.yml and returns them.
    """

    metrics = []

    for fpath in rocksdb.get_db_bench_files(tcase):
        pmetric = rocksdb.parse_db_bench_file(fpath)
        if not pmetric:
            continue

        ctx = rocksdb.make_context(
            pmetric,
            extr_name=_MY_NAME,
            fname=os.path.basename(fpath),
            evars=tcase.evars,
        )

        metrics.append({
            "ctx": ctx,
            "iops": to_base_unit(pmetric["iops"], ""),
            "bwps": to_base_unit(pmetric["mbps"], "MiB"),
            "lat": to_base_unit(pmetric["lat"], "msec"),
        })

    if metrics:  # Only dump non-empty metrics
        dump_metrics_to_file(metrics, tcase.aux_root)

    return metrics

    Locate testcase db_bench files and parse them.
    Writes metrics to aux_root/metrics.yml and returns them.
    
Locate testcase db_bench files and parse them.
Writes metrics to aux_root/metrics.yml and returns them.
Locate testcase db_bench files and parse them . Writes metrics to aux_root / metrics . yml and returns them .
def extract_metrics(tcase: TestCase) -> List[dict]:
    metrics = []
    for fpath in rocksdb.get_db_bench_files(tcase):
        pmetric = rocksdb.parse_db_bench_file(fpath)
        if not pmetric:
            continue
        ctx = rocksdb.make_context(
            pmetric,
            extr_name=_MY_NAME,
            fname=os.path.basename(fpath),
            evars=tcase.evars,
        )
        metrics.append({
            "ctx": ctx,
            "iops": to_base_unit(pmetric["iops"], ""),
            "bwps": to_base_unit(pmetric["mbps"], "MiB"),
            "lat": to_base_unit(pmetric["lat"], "msec"),
        })
    if metrics:  
        dump_metrics_to_file(metrics, tcase.aux_root)
    return metrics
def extract_metrics ( tcase : TestCase ) -> List [ dict ] : metrics = [ ] for fpath in rocksdb . get_db_bench_files ( tcase ) : pmetric = rocksdb . parse_db_bench_file ( fpath ) if not pmetric : continue ctx = rocksdb . make_context ( pmetric , extr_name = _MY_NAME , fname = os . path . basename ( fpath ) , evars = tcase . evars , ) metrics . append ( { "ctx" : ctx , "iops" : to_base_unit ( pmetric [ "iops" ] , "" ) , "bwps" : to_base_unit ( pmetric [ "mbps" ] , "MiB" ) , "lat" : to_base_unit ( pmetric [ "lat" ] , "msec" ) , } ) if metrics : dump_metrics_to_file ( metrics , tcase . aux_root ) return metrics
Locate testcase db_bench files and parse them.
Locate testcase db_bench files and parse them .
"""
    Locate testcase db_bench files and parse them.
    Writes metrics to aux_root/metrics.yml and returns them.
    """ # Only dump non-empty metrics
tcase
TestCase