Skip to content

Commit

Permalink
octopus benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
cirosantilli committed Sep 4, 2018
1 parent cfc6095 commit 42c0d43
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions other-test-repos/many-commits-octopus.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 5 additions & 1 deletion other-test-repos/many-commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import datetime
import subprocess
import time
import sys

import util

Expand All @@ -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(
Expand Down

0 comments on commit 42c0d43

Please sign in to comment.