Skip to content

Commit 42c0d43

Browse files
committed
octopus benchmark
1 parent cfc6095 commit 42c0d43

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

other-test-repos/many-commits-octopus.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
#!/usr/bin/env python3
22

3+
"""
4+
100k:
5+
6+
- generates in seconds
7+
- size after script: 4Gb
8+
- git gc time: 1h30 min on https://github.com/cirosantilli/linux-kernel-module-cheat/tree/83b36867cf06ffdca3ce04296a8568d4f37ea13b#p51
9+
- size afte git gc: 78Mb
10+
"""
11+
312
import datetime
413
import subprocess
514
import time

other-test-repos/many-commits.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import datetime
2727
import subprocess
2828
import time
29+
import sys
2930

3031
import util
3132

@@ -36,7 +37,10 @@
3637

3738
tree = util.create_tree_with_one_file()
3839
commit = None
39-
n = 1000000
40+
if len(sys.argv) > 1:
41+
n = int(sys.argv[1])
42+
else:
43+
n = 1000
4044
for i in range(n):
4145
now = int(time.time())
4246
commit, _, _ = util.save_commit_object(

0 commit comments

Comments
 (0)