aboutsummaryrefslogtreecommitdiff
path: root/compute-tree-sizes.sh
diff options
context:
space:
mode:
authorW. Kosior <koszko@koszko.org>2025-09-19 12:47:44 +0200
committerW. Kosior <koszko@koszko.org>2025-09-19 13:09:45 +0200
commit7000b1f2bb2fca5b7707c9b1a9f58f43100212d3 (patch)
treecc5531b93b8e76c39e3c58d52574f68e86c3f05e /compute-tree-sizes.sh
downloadAGH-msc-thesis-magister.tar.gz
AGH-msc-thesis-magister.zip
Initial commit.HEADmagister
Diffstat (limited to 'compute-tree-sizes.sh')
-rwxr-xr-xcompute-tree-sizes.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/compute-tree-sizes.sh b/compute-tree-sizes.sh
new file mode 100755
index 0000000..efc54e5
--- /dev/null
+++ b/compute-tree-sizes.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+## SPDX-License-Identifier: CC0-1.0
+##
+## Copyright (C) 2025 Woj. Kosior <koszko@koszko.org>
+
+set -e
+
+RESULTS_PATH="$1"
+
+COLUMN_NAMES="NAME IN-DEBIAN BREAKING-CHANGES"
+for TREE_KIND in $(./helper.sh --get-tree-kinds); do
+ for MEASURE_TYPE in $(./helper.sh --get-measure-types); do
+ COLUMN_NAMES="$COLUMN_NAMES $TREE_KIND-$MEASURE_TYPE"
+ done
+done
+
+./helper.sh --get-csv-columns "$RESULTS_PATH" $COLUMN_NAMES |
+ grep -vE ',[A-Z]+-n/a' |
+ sed '
+ s/,ID-yes,/,1,/;
+ s/,ID-no,/,0,/;
+ s/,BC-yes,/,1,/;
+ s/,BC-no[^,]*,/,0,/;
+ s/[A-Z]\+-\([0-9]\)/\1/g;
+ '