diff options
-rw-r--r-- | exp/Makefile | 18 | ||||
-rwxr-xr-x | exp/exp.sh | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/exp/Makefile b/exp/Makefile index a8f9675..c2e2e3f 100644 --- a/exp/Makefile +++ b/exp/Makefile @@ -4,16 +4,22 @@ REPO_PATH := repo GIT_PATH := git GITC := git -C $(REPO_PATH) +TEMP := temp + .PHONY: all -all: versions - @echo "total size : `awk '{s+=$$1}END{print s}' $<`" - @echo "version count : `wc -l $<`" +all: versions results + @echo "total size : `head --lines=1 results | cut -f1`" + @echo "version count : `wc -l versions`" versions: results grep [0-9]$$ $< | cut -f1 > $@ -results: commits ../dna-backup - ./exp.sh $< $(REPO_PATH) 1| sort -k2 >$@ +results: | $(TEMP) + du -bad 2 $(TEMP) | sort -k2 > $@ + +$(TEMP): commits ../dna-backup + rm -rf $(TEMP) + ./exp.sh $< $(REPO_PATH) $(TEMP) ../dna-backup: .FORCE @$(MAKE) -C .. --no-print-directory dna-backup @@ -30,7 +36,7 @@ repo git: .PHONY: clean clean: - rm -rf $(REPO_PATH) $(GIT_PATH) + rm -rf $(REPO_PATH) $(GIT_PATH) $(TEMP) rm -f commits results versions .FORCE: ; @@ -2,12 +2,7 @@ commits_file=$1 repo_path=$2 - -temp_templ="dna-backup-bench-XXXXX" -mktemp="mktemp --tmpdir -d $temp_templ" - -temp=$($mktemp) -echo temp dir: $temp >&2 +temp=$3 cat $commits_file | while read i do @@ -15,4 +10,3 @@ do git -C $repo_path checkout $hash ../dna-backup commit -v 2 $repo_path $temp done -du -bad 2 $temp |