aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-10-13 00:14:37 +0200
committern-peugnet <n.peugnet@free.fr>2021-10-13 00:14:37 +0200
commite0482eff8323bd5f2133078c8b809d757f9725be (patch)
tree235487fde7798f7975f1548c47a4dbd01999fe5a
parent52833e6a4f06da56d2adeea000c9db9b2510d3a4 (diff)
downloaddna-backup-e0482eff8323bd5f2133078c8b809d757f9725be.tar.gz
dna-backup-e0482eff8323bd5f2133078c8b809d757f9725be.zip
fix exp daily commits using git log --first-parent
Without this option daily commits visibly alternated between two branches, creating huge diffs at each switch, and causing the data to be misleading.
-rw-r--r--README.md116
-rw-r--r--exp/Makefile34
-rw-r--r--exp/README.md17
3 files changed, 88 insertions, 79 deletions
diff --git a/README.md b/README.md
index 27dcd44..9135b58 100644
--- a/README.md
+++ b/README.md
@@ -152,7 +152,7 @@ l'ensemble des fichiers.
### Bases de comparaison
-Pour évaluer les performances du système DNA-Backup, trois autres systèmes de
+Pour évaluer les performances du système DNA-Backup, quatre autres systèmes de
stockage versionnés ont été choisis comme base de comparaison :
- **Git diffs**
@@ -276,78 +276,78 @@ Commits journaliers :
```
=============================== SUMMARY ===============================
- dna_4k dna_8k diffs nopack targz real
- 66,399,072 60,446,750 47,304,261 63,594,844 47,877,584 202,628,344
- 21,873,958 24,422,316 9,911,248 43,598,822 50,529,069 214,276,336
- 4,724 4,747 1,175 26,968 50,529,943 214,278,164
- 347,460 242,271 9,912,728 76,072 47,893,781 202,636,078
- 159,814 16,899 3,307 56,203 47,894,249 202,639,214
- 2,918,706 2,762,164 9,911,148 41,606 50,531,041 214,283,553
- 349,216 253,022 9,910,361 139,911 47,890,923 202,641,133
- 2,865,631 2,794,693 9,912,341 69,243 50,530,875 214,285,297
- 233,171 2,504 214 9,789 50,531,578 214,285,426
- 343,483 234,834 9,914,620 13,703 47,894,718 202,641,398
- 833,810 871,476 266,905 4,764,839 47,843,104 202,455,083
- 237,510 270,660 142,110 1,976,823 47,793,819 202,272,761
- 167,305 87,432 18,611 6,256 47,791,775 202,244,796
- 113 140 289 2,009 47,791,778 202,244,779
- 2,930,957 2,796,716 10,165,351 64,393 50,534,975 214,286,010
- 20,364 32,883 7,841 48,219 50,533,061 214,283,569
- 351,923 235,867 9,923,334 117,287 47,896,130 202,642,396
+ dna_4k dna_8k diffs nopack targz real
+ 66,026,534 60,083,471 47,011,621 63,237,214 47,582,036 201,476,675
+ 8,010 12,882 2,625 88,673 47,580,422 201,472,392
+ 8,368,117 9,854,802 3,270,798 26,668,802 48,699,094 206,006,230
+ 203,941 107,870 496 24,839 48,699,144 206,006,227
+ 214,572 121,041 1,475 318,053 48,699,266 206,006,571
+ 254,132 161,759 3,271,631 107,651 47,592,358 201,472,618
+ 419,776 395,453 99,337 2,758,951 47,579,804 201,420,809
+ 72,677 86,780 127,793 561,940 47,578,309 201,415,269
+ 153,987 75,273 19,221 10,035 47,590,552 201,467,847
+ 299,196 224,155 250,581 1,203,018 47,719,274 202,032,972
+ 40,413 39,673 19,555 550,478 47,721,098 202,042,129
+ 158,232 79,739 203 45,564 47,721,112 202,042,114
+ 182,559 116,565 12,419 284,765 47,725,696 202,057,720
+ 12,368 13,040 5,823 76,010 47,731,040 202,065,875
+ 23,134 28,412 13,370 528,743 47,738,360 202,078,613
+ 26,724 33,395 10,837 374,955 47,735,904 202,078,276
+ 71,352 84,410 69,707 498,918 47,771,130 202,216,013
================================ TOTAL ================================
- 100,037,217 95,475,374 127,305,844 114,606,987 832,288,403 3,525,024,337
+ 76,535,724 71,518,720 54,187,492 97,338,609 813,464,599 3,443,358,350
```
Commits hebdomadaires :
```
=============================== SUMMARY ===============================
- dna_4k dna_8k diffs nopack real
- 70,192,809 63,852,374 49,917,523 67,132,003 214,292,720
- 31,567 28,668 8,822 90,423 214,301,810
- 27,389 31,485 10,920 99,194 214,299,953
- 18,135,507 20,861,135 9,918,650 40,011,293 202,624,903
- 907,939 1,209,389 285,459 4,920,733 202,470,023
- 113,871 152,351 293,731 137,519 202,618,267
- 294,810 367,701 272,263 2,304,224 203,092,308
- 2,112,921 2,540,859 1,148,513 9,636,016 201,476,675
- 252,068 288,241 609,369 857,331 202,282,568
- 782,812 981,296 697,995 2,758,951 201,420,809
- 136,493 161,325 398,494 727,346 202,065,360
- 62,677 80,290 134,441 458,130 202,251,722
- 162,061 196,716 365,229 230,404 202,465,009
- 7,665 9,678 10,625 77,034 202,457,471
- 71,731 80,298 152,999 187,241 202,615,704
- 307,109 222,474 241,092 12,081 203,083,912
- 305,795 228,540 35,494 740,246 203,113,279
+ dna_4k dna_8k diffs nopack targz real
+ 65,996,508 60,066,667 47,003,541 63,221,563 47,569,933 201,420,809
+ 889,756 985,651 395,080 6,358,050 47,723,749 202,065,875
+ 8,109,685 9,714,907 2,994,599 25,581,925 48,700,415 206,003,757
+ 205,101 108,968 407 50,815 48,700,637 206,003,795
+ 225,841 144,120 8,679 401,381 48,698,820 206,005,265
+ 1,657,786 2,050,048 579,422 6,943,222 48,733,791 206,098,060
+ 1,206,672 1,495,828 360,710 4,799,958 48,840,759 206,648,359
+ 1,926,509 2,385,637 738,359 4,983,831 48,892,096 206,834,840
+ 2,263,134 2,498,842 1,389,502 7,767,439 49,297,747 209,328,856
+ 592,440 861,038 146,129 2,899,286 49,331,055 209,479,362
+ 198,407 264,136 47,436 1,385,568 49,333,845 209,503,564
+ 155,538 266,689 37,183 1,808,603 49,338,373 209,509,777
+ 102,087 136,482 23,924 1,555,868 49,336,559 209,515,352
+ 4,044,866 4,845,345 1,404,256 11,037,484 49,933,159 211,878,380
+ 6,529,456 7,605,526 2,326,692 17,577,030 50,214,110 212,941,025
+ 1,258,880 1,658,700 304,617 6,594,520 50,293,382 213,254,405
+ 840,200 1,051,378 258,512 4,016,395 50,398,489 213,650,745
================================ TOTAL ================================
- 93,905,224 91,292,820 64,501,619 130,380,169 3,476,932,493
+ 96,202,866 96,139,962 58,019,048 166,982,938 835,336,919 3,540,142,226
```
Commits mensuels :
```
=============================== SUMMARY ===============================
- dna_4k dna_8k diffs nopack real
- 66,344,139 60,414,327 47,255,410 63,531,013 202,455,244
- 268,382 293,432 71,579 2,114,221 202,438,437
- 288,294 288,397 137,081 2,625,834 202,477,165
- 2,617,048 2,989,196 1,106,365 11,273,622 203,355,330
- 4,219,402 5,065,795 1,485,211 14,062,635 206,087,365
- 6,925,148 8,177,404 3,102,478 20,489,609 209,450,906
- 1,931,351 2,314,294 771,998 6,811,409 209,646,120
- 9,775,191 11,577,926 3,335,990 26,532,154 213,287,798
- 7,783,071 9,101,660 2,505,353 20,687,252 216,420,188
- 9,445,609 10,977,253 3,479,709 25,758,937 217,852,953
- 701,911 905,423 164,682 4,517,360 217,851,223
- 14,385,992 16,467,969 4,380,280 32,949,448 222,875,080
- 3,389,340 4,347,527 817,894 14,054,849 223,352,903
- 13,307,722 15,446,179 4,060,874 32,889,854 225,760,003
- 3,219,293 3,895,349 1,301,487 10,953,334 225,577,911
- 1,876,709 2,451,988 390,110 9,171,030 225,848,365
- 12,995,018 15,561,939 4,204,779 32,837,755 227,575,213
+ dna_4k dna_8k diffs nopack targz real
+ 67,749,414 61,662,329 48,249,466 64,900,653 48,828,605 206,662,692
+ 2,396,108 2,454,980 1,495,969 7,407,714 48,900,735 206,964,143
+ 1,953,606 2,180,048 797,390 9,856,043 49,326,511 209,515,646
+ 10,598,329 12,226,656 4,142,700 28,400,251 50,394,403 213,653,996
+ 14,285,731 16,520,326 5,489,832 34,132,686 51,315,648 217,862,957
+ 7,761,827 8,683,938 2,262,584 19,233,445 51,941,615 220,756,834
+ 10,116,837 12,628,400 2,999,817 28,983,950 52,574,107 223,306,219
+ 1,457,911 1,901,545 299,628 8,343,393 52,587,994 223,373,786
+ 14,563,753 16,805,176 4,759,088 34,259,652 53,210,823 226,113,059
+ 2,313,331 2,886,878 679,794 10,029,012 53,165,063 225,781,616
+ 765,371 1,003,047 138,547 4,375,159 53,183,197 225,870,650
+ 17,011,965 20,527,210 5,142,691 45,544,733 53,842,821 228,546,001
+ 1,415,857 1,831,671 247,526 8,491,133 53,876,401 228,653,615
+ 7,445,399 8,214,306 2,333,317 18,119,613 54,605,555 232,014,492
+ 13,079,884 15,834,194 3,989,065 37,945,661 55,206,806 234,571,285
+ 13,890,556 16,436,758 3,800,775 37,509,079 56,059,067 238,170,923
+ 11,523,815 13,696,636 3,030,148 32,387,325 56,716,443 241,420,002
================================ TOTAL ================================
- 159,473,620 170,276,058 78,571,280 331,260,316 3,652,312,204
+198,329,694 215,494,098 89,858,337 429,919,502 895,735,794 3,803,237,916
```
<!-- LTeX: language=en -->
diff --git a/exp/Makefile b/exp/Makefile
index 8b7ce5c..e7c104a 100644
--- a/exp/Makefile
+++ b/exp/Makefile
@@ -1,14 +1,21 @@
-REPO_URL := https://club1.fr/~nicolas/git/dna-backup/
-
SHELL := /bin/bash
+################# Principal parameters #################
+
+REPO_URL ?= https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
+REPO_BRANCH ?= master
+RANGE ?= daily
+# Number of initial commits to skip. This option has been added for the
+# Linux kernel repo, as the first commits are too far away date wise.
+SKIP_COMMITS ?= 0
+
# Reset LC_NUMERIC to make printf thousands separator work as expected
export LC_NUMERIC :=
export DNA_BACKUP ?= ../dna-backup
export DNA_PARAMS ?= dna_params
export MAX_VERSION ?= 5
-export COMMITS ?= commits.daily
+export COMMITS ?= commits.$(RANGE)
DNA_4K ?= dna_4k
DNA_8K ?= dna_8k
NOPACK ?= nopack
@@ -21,10 +28,6 @@ export REPO_PATH ?= repo
export GIT_PATH ?= $(abspath git)
GITC := git -C $(REPO_PATH)
-# Number of initial commits to skip. This option has been added for the
-# Linux kernel repo, as the first commits are too far away date wise.
-SKIP_COMMITS ?= 30
-
DNADIRS := $(DNA_4K) $(DNA_8K)
DATADIRS := $(DNA_4K) $(DNA_8K) $(DIFFS) $(NOPACK) $(TARGZ) $(REAL)
SIZEFILES := $(DATADIRS:%=%.size)
@@ -65,7 +68,7 @@ $(NOPACK).size: $(NOPACK).versions run
| bc \
>> $@; \
prev=$$i; \
- done
+ done
%.size: % run
find $< -type f -exec du -ba {} + | sort -k2 | cut -f1 > $@
@@ -105,16 +108,21 @@ $(DATADIRS) $(NOPACK).versions $(REAL).versions:
$(DNA_BACKUP): .FORCE
@$(MAKE) -C $(@D) --no-print-directory $(@F)
+.INTERMEDIATE: commits.monthly
commits.monthly: commits.daily
sed -n '0~30p' $< > $@
+.INTERMEDIATE: commits.weekly
commits.weekly: commits.daily
sed -n '0~7p' $< > $@
-commits.daily: | repo git
- $(GITC) log --reverse --no-merges --pretty=tformat:"%H %as" \
+.INTERMEDIATE: commits.daily
+commits.daily: commits
+ tail -n +$(SKIP_COMMITS) $< > $@
+
+commits: | repo git
+ $(GITC) log $(REPO_BRANCH) --reverse --date-order --first-parent --pretty=tformat:"%H %as" \
| sort --unique --key=2 \
- | tail -n +$(SKIP_COMMITS) \
> $@
repo git &:
@@ -125,11 +133,11 @@ repo git &:
.PHONY: clean
clean: mostlyclean
rm -rf $(REPO_PATH) $(GIT_PATH)
- rm -f commits.*
+ rm -f commits
mostlyclean: resultsclean
rm -rf $(DATADIRS) $(DATADIRS:%=%.versions)
- rm -f run $(DATADIRS:%=%.results) $(DNA_PARAMS)
+ rm -f run $(DATADIRS:%=%.results) $(DNA_PARAMS) commits.*
resultsclean:
rm -f summary.csv $(SIZEFILES)
diff --git a/exp/README.md b/exp/README.md
index 1437aea..2ad6ece 100644
--- a/exp/README.md
+++ b/exp/README.md
@@ -4,7 +4,7 @@
```bash
# run experiences
-make [SKIP_COMMITS=<count>] [MAX_VERSION=<count>] [COMMITS=<file>]
+make [SKIP_COMMITS=<count>] [MAX_VERSION=<count>] [RANGE=<range>]
# clean results
make mostlyclean
@@ -13,12 +13,13 @@ make mostlyclean
make clean
```
-Les 3 fichiers de commits suivants peuvent être automatiquement générés :
+`<range>` can be one of these:
+- `daily`
+- `weekly`
+- `monthly`
-- `commits.daily`
-- `commits.weekly`
-- `commits.monthly`
+By default:
-Par défaut les 30 premiers commits journaliers sont skippés, le nombre
-max de version utilisés pour l'expérience est 5 et le fichier
-`commits.daily` est utiliser comme source de commits.
+- `SKIP_COMMITS` = 0
+- `MAX_VERSION` = 5
+- `RANGE` = daily