Created
March 1, 2013 12:06
-
-
Save andizzle/5064226 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import subprocess | |
def create_commits(path): | |
os.chdir(path) | |
for i in xrange(1, 10): | |
start = time.clock() | |
subprocess.call('dd if=/dev/urandom of=testfile_1MB bs=1024 count=1', shell=True) | |
subprocess.call('cat testfile_1MB >> testfile_500MB', shell=True) | |
subprocess.call('rm testfile_1MB', shell=True) | |
subprocess.call('git commit -am"' + str(i) + '"', shell=True) | |
def checkout(path, commit): | |
os.chdir(path) | |
subprocess.call('git reset --hard ' + commit, shell=True) | |
def main(): | |
create_commits('/Users/andy/Desktop/test1/') | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment