code: def mtscomp_perf(**kwargs):
      ds = kwargs.pop("ds", None)
      assert ds
  
      name, n_channels, sample_rate, duration = ds
  
      # Compress the file.
      path = Path("data/" + name)
      out = path.parent / "data.cbin"
      outmeta = path.parent / "data.ch"
      t0 = time.perf_counter()
      compress(
          path,
          out,
          outmeta,
          sample_rate=sample_rate,
          n_channels=n_channels,
          dtype=dtype,
          check_after_compress=False,
          **kwargs,
      )
      t1 = time.perf_counter()
      wt = t1 - t0
  
      # Decompress the file and write it to disk.
      out2 = path.with_suffix(".decomp.bin")
      t0 = time.perf_counter()
      decompress(out, outmeta, out2, check_after_decompress=False)
      t1 = time.perf_counter()
      rtc = t1 - t0
  
      # Read the uncompressed file.
      t0 = time.perf_counter()
      x = load_raw_data(
          path, n_channels=n_channels, dtype=dtype, mmap=False
      )
      assert x.size
      t1 = time.perf_counter()
      rtdec = t1 - t0
  
      orig_size = path.stat().st_size
      compressed_size = out.stat().st_size
  
      return {
          "read_time_compressed": rtc,
          "read_time_decompressed": rtdec,
          "write_time": wt,
          "ratio": 100 - 100 * compressed_size / orig_size,
      }
  
file_path: mtscomp/benchmark.py
imports: from itertools import product, repeat
  from pathlib import Path
  import time
  from tabulate import tabulate
  import numpy
  from joblib import Memory
  from tqdm import tqdm
  from mtscomp import compress, decompress, load_raw_data
label_desc: Use image node_id 1 for calling a global function with example usage: mtscomp_perf() and returns: dict