From fc3c74cbe8d1703928ab0a012ef61bc531d98620 Mon Sep 17 00:00:00 2001 From: askiiart Date: Mon, 18 Nov 2024 19:10:43 -0600 Subject: [PATCH] fuse-archive now no longer shows up when unnecessary --- assets/benchmarking-dwarfs/js/rand_latency.js | 8 +------- assets/benchmarking-dwarfs/process-data.py | 18 +++++++++++++++++- style.css | 3 ++- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/assets/benchmarking-dwarfs/js/rand_latency.js b/assets/benchmarking-dwarfs/js/rand_latency.js index 112bd19..4a4ad67 100644 --- a/assets/benchmarking-dwarfs/js/rand_latency.js +++ b/assets/benchmarking-dwarfs/js/rand_latency.js @@ -6,16 +6,10 @@ data = [ backgroundColor: 'rgb(255, 99, 132)', }, - { - label: 'fuse-archive (tar)', - data: [0.0, 0.0, 0.0, 0.0, 1.4119999999999998e-06, 2.144e-06], - backgroundColor: 'rgb(75, 192, 192)', - }, - { label: 'Btrfs', data: [0.00551523, 0.09113626, 0.09405722, 0.0009497709999999999, 9.82e-07, 1.242e-06], - backgroundColor: 'rgb(54, 162, 235)', + backgroundColor: 'rgb(75, 192, 192)', }, ] diff --git a/assets/benchmarking-dwarfs/process-data.py b/assets/benchmarking-dwarfs/process-data.py index 626300a..bae0206 100644 --- a/assets/benchmarking-dwarfs/process-data.py +++ b/assets/benchmarking-dwarfs/process-data.py @@ -51,11 +51,16 @@ class HelperFunctions: return float(time) def get_data(single_files_index: int, bulk_test_name: str): + skip_fuse_archive_tar = False + if bulk_test_name == 'bulk_random_read_latency': + skip_fuse_archive_tar = True # format: { 'labels': ['btrfs'], 'btrfs': [9, 8, 4, 6]} data = {'labels': []} with open('assets/benchmarking-dwarfs/data/benchmark-data.csv', 'rt') as f: for line in csv.reader(f): fs = HelperFunctions.get_fs(line[0]) + if fs == 'fuse-archive (tar)' and skip_fuse_archive_tar: + continue label = HelperFunctions.get_label(line[1]) data['labels'].append(label) if label not in data[ 'labels' @@ -108,6 +113,7 @@ def get_data(single_files_index: int, bulk_test_name: str): ] else False for item in line[3:]: + # FIXME: this breaks if the bulk time is a larger unit than the single file time if largest_time_unit == 's': break if item.endswith('ms'): @@ -123,11 +129,21 @@ def get_data(single_files_index: int, bulk_test_name: str): elif re.sub('[0-9]\\.', '', item) == 's': largest_time_unit = 's' break + + # on the single file tests fuse-archive fails, and it's so small is shows as 0 here anyways, so might as well skip it + if fs == 'fuse-archive (tar)' and largest_time_unit == 's' and skip_fuse_archive_tar: + continue for i in range(len(line[3:])): line[i + 3] = HelperFunctions.convert_time(item, largest_time_unit) - data[fs].append(sum(line[3:]) / len(line[3:])) + try: + data[fs].append(sum(line[3:]) / len(line[3:])) + except KeyError: + data[fs] = [0, 0, 0, 0] + data[fs].append(sum(line[3:]) / len(line[3:])) + + return (data, largest_time_unit) diff --git a/style.css b/style.css index 35353b6..6d62f4b 100644 --- a/style.css +++ b/style.css @@ -120,6 +120,7 @@ img { } .chart { + min-width: 600px; max-width: 50vw; - max-height: 50vh; + max-height: 50vh; } \ No newline at end of file