summaryrefslogtreecommitdiffstats
path: root/bm/bm_size.pl
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2026-04-19 11:46:27 +0800
committerSadeep Madurange <sadeep@asciimx.com>2026-04-19 11:46:27 +0800
commitdd3af6be8d1c1a12d9cefc072928282056892f3a (patch)
treeb33eb62d1ba997b00833da523e7e833c6208da39 /bm/bm_size.pl
parent015192c00e9bdc178eac2194228d7f5e190e88d3 (diff)
downloadurn-dd3af6be8d1c1a12d9cefc072928282056892f3a.tar.gz
Repo size benchmarks.
Diffstat (limited to 'bm/bm_size.pl')
-rw-r--r--bm/bm_size.pl17
1 files changed, 9 insertions, 8 deletions
diff --git a/bm/bm_size.pl b/bm/bm_size.pl
index e9de614..21a05b0 100644
--- a/bm/bm_size.pl
+++ b/bm/bm_size.pl
@@ -16,7 +16,7 @@ my $seed_bin = abs_path("seed.pl");
my $bm_repo = "bm_repo";
my %results;
-my @actions = qw(Status Add Commit);
+my @actions = qw(Status Add Commit Status(Clean));
sub count_inodes {
my $dir = shift;
@@ -46,9 +46,10 @@ sub run_benchmark {
system("$init_cmd > /dev/null 2>&1");
my %cmds = (
- "Status" => ($tool_name eq "URN") ? "perl $urn_bin status" : "git status",
- "Add" => ($tool_name eq "URN") ? "perl $urn_bin add ." : "git add .",
- "Commit" => ($tool_name eq "URN") ? "perl $urn_bin commit -m 'bench'" : "git commit -m 'bench'",
+ "Status" => ($tool_name eq "URN") ? "perl $urn_bin status" : "git status",
+ "Add" => ($tool_name eq "URN") ? "perl $urn_bin add ." : "git add .",
+ "Commit" => ($tool_name eq "URN") ? "perl $urn_bin commit -m 'bench'" : "git commit -m 'bench'",
+ "Status(Clean)" => ($tool_name eq "URN") ? "perl $urn_bin status" : "git status",
);
foreach my $action (@actions) {
@@ -92,11 +93,11 @@ foreach my $action (@actions) {
print $res "-------------------------------------------------------------\n";
printf $res "%-15s | %-20s | %-20s\n", "METRIC", "URN", "GIT";
print $res "----------------+----------------------+---------------------\n";
- printf $res "%-15s | %20s | %20s\n", "Real Time", $u->{real}."s", $g->{real}."s";
+ printf $res "%-15s | %20s | %20s\n", "Real time", $u->{real}."s", $g->{real}."s";
printf $res "%-15s | %20s | %20s\n", "Max RSS", $u->{rss}, $g->{rss};
- printf $res "%-15s | %20s | %20s\n", "Page Faults", $u->{faults}, $g->{faults};
- printf $res "%-15s | %20s | %20s\n", "Meta Inodes", $u->{inodes}, $g->{inodes};
- printf $res "%-15s | %20s | %20s\n", "Meta Size", $u->{disk}, $g->{disk};
+ printf $res "%-15s | %20s | %20s\n", "Page faults", $u->{faults}, $g->{faults};
+ printf $res "%-15s | %20s | %20s\n", "Inodes", $u->{inodes}, $g->{inodes};
+ printf $res "%-15s | %20s | %20s\n", "Repo size", $u->{disk}, $g->{disk};
print $res "-------------------------------------------------------------\n\n";
}