nqminhuit / gis

Java Command Line Application which extends Git for supporting git-modules
1 stars 0 forks source link

Stress test gis #13

Closed nqminhuit closed 3 weeks ago

nqminhuit commented 2 years ago

Target commands:

For comparison and maintain good performance, we need a big repo to stress test. Plan:

use this tool to record performance: https://github.com/sharkdp/hyperfine

should use container with limited resource for persistent results, can use github actions for that? https://docs.github.com/en/actions/creating-actions/creating-a-composite-action


hyperfine examples: execute 'gis co master' before each test run and after all

hyperfine --prepare 'gis co master' --cleanup 'gis co master' --warmup 3 'gis co br_tst_1'

add option --show-output to see if it actually do the prepare and cleanup

nqminhuit commented 2 years ago

create branch:

create new branch on all modules: echo "***" | gis cb $(uuidgen | sed 's/-//g' | cut -c -10);
create commit for each module: ....
push all commits from all modules to remote
nqminhuit commented 8 months ago

small repo: https://github.com/nienzoro/small-git-root-module big repo: https://github.com/nqminhuit/git-submodule-stress-test

nqminhuit commented 3 weeks ago

to auto create branch:

step 1: create new local branch

gis cb br_tst_1

step 2: for each submodule, create max 250 modified files and commit:

for j in {1..100}; do {(cd git-submodule-test$j; for i in {1..250}; do {rand=$((1 + $RANDOM  % 1000)); shuf text1000 > text-$rand } done; git add .; git commit -m "commit-$(uuidgen)"; git gc;)} done

step 3: push:

gis push -r

step 4: checkout back to 'master'

gis co master

Bash script:

createBranch() {
    brName=$1
    gis cb $brName;
    for j in {1..100};
    do {(
           cd git-submodule-test$j;
           for i in {1..250};
           do {
                   rand=$((1 + $RANDOM  % 1000));
                   shuf text1000 > text-$rand;
               }
           done;
           git add .;
           git commit -m "commit-$(uuidgen)";
           git push -u origin $brName;
           git gc;
       )}
    done;
    git push -u origin $brName;
    gis co master;
}

for i in {1..100};
do {
    createBranch br_tst_$i
} done;
nqminhuit commented 3 weeks ago

performance result is documented on README.md


| Command          | Mean [ms]       | Min [ms] | Max [ms] | Relative |
|------------------+-----------------+----------+----------+----------|
| gis              | 98.4 ± 5.9      |     89.0 |    110.9 |     1.00 |
| gis branches -nn | 73.4 ± 3.1      |     65.6 |     82.8 |     1.00 |
| gis branches     | 74.2 ± 3.0      |     66.3 |     79.2 |     1.00 |
| gis co br_tst_1  | 4344.0 ± 2407.7 |   1264.6 |   7656.9 |     1.00 |
| gis fetch        | 5095.3 ± 1722.7 |   3494.3 |   8454.7 |     1.00 |
| gis files        | 3578.6 ± 50.8   |   3535.7 |   3715.6 |     1.00 |
| gis status       | 98.6 ± 4.6      |     88.8 |    107.8 |     1.00 |

Performance is run with:

CPU info:

CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE    MAXMHZ   MINMHZ      MHZ
  0    0      0    0 0:0:0:0          yes 4600.0000 800.0000 800.0280
  1    0      0    0 0:0:0:0          yes 4600.0000 800.0000 800.1450
  2    0      0    1 4:4:1:0          yes 4600.0000 800.0000 800.3250
  3    0      0    1 4:4:1:0          yes 4600.0000 800.0000 800.4990
  4    0      0    2 8:8:2:0          yes 4600.0000 800.0000 800.2260
  5    0      0    2 8:8:2:0          yes 4600.0000 800.0000 800.0000
  6    0      0    3 12:12:3:0        yes 4600.0000 800.0000 799.5920
  7    0      0    3 12:12:3:0        yes 4600.0000 800.0000 800.0000
  8    0      0    4 16:16:4:0        yes 4600.0000 800.0000 800.0000
  9    0      0    4 16:16:4:0        yes 4600.0000 800.0000 800.0000
 10    0      0    5 20:20:5:0        yes 4600.0000 800.0000 840.4300
 11    0      0    5 20:20:5:0        yes 4600.0000 800.0000 800.0000
 12    0      0    6 28:28:7:0        yes 3300.0000 800.0000 800.0000
 13    0      0    7 29:29:7:0        yes 3300.0000 800.0000 800.0000
 14    0      0    8 30:30:7:0        yes 3300.0000 800.0000 800.0000
 15    0      0    9 31:31:7:0        yes 3300.0000 800.0000 800.0000

RAM info:

RANGE                                 SIZE  STATE REMOVABLE  BLOCK
0x0000000000000000-0x000000007fffffff   2G online       yes   0-15
0x0000000100000000-0x000000087fffffff  30G online       yes 32-271

Memory block size:       128M
Total online memory:      32G
Total offline memory:      0B

gis version: 1.1.4