From 42c0d43047c45a1aee672164d1a771a2fd2abe59 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Tue, 4 Sep 2018 19:10:07 +0100 Subject: [PATCH] octopus benchmark --- other-test-repos/many-commits-octopus.py | 9 +++++++++ other-test-repos/many-commits.py | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/other-test-repos/many-commits-octopus.py b/other-test-repos/many-commits-octopus.py index ccdf9b0..2ec3964 100755 --- a/other-test-repos/many-commits-octopus.py +++ b/other-test-repos/many-commits-octopus.py @@ -1,5 +1,14 @@ #!/usr/bin/env python3 +""" +100k: + +- generates in seconds +- size after script: 4Gb +- git gc time: 1h30 min on https://github.com/cirosantilli/linux-kernel-module-cheat/tree/83b36867cf06ffdca3ce04296a8568d4f37ea13b#p51 +- size afte git gc: 78Mb +""" + import datetime import subprocess import time diff --git a/other-test-repos/many-commits.py b/other-test-repos/many-commits.py index 148be66..32565ec 100755 --- a/other-test-repos/many-commits.py +++ b/other-test-repos/many-commits.py @@ -26,6 +26,7 @@ import datetime import subprocess import time +import sys import util @@ -36,7 +37,10 @@ tree = util.create_tree_with_one_file() commit = None -n = 1000000 +if len(sys.argv) > 1: + n = int(sys.argv[1]) +else: + n = 1000 for i in range(n): now = int(time.time()) commit, _, _ = util.save_commit_object(