{"thread":{"id":"46819","subject":"[PATCH v2 1/9] perf/run: add '--config' option to the 'run' script","startedAt":"2017-09-23T19:56:03Z","lastAt":"2017-11-24T10:28:55Z","messageCount":14,"participants":["Christian Couder","Junio C Hamano","Kevin Daudt","Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":2,"patchTotal":9},"messages":[{"id":"328739","messageId":"0102015eb04f8927-439213ae-a464-4638-affa-f0d6484086c0-000000@eu-west-1.amazonses.com","threadId":"46819","inReplyTo":"CAP8UFD3tG3fOgftFJAB4mKD2N+uAH0aac4RmFmdXZ=ORHmKzQQ@mail.gmail.com","subject":"[PATCH v2 1/9] perf/run: add '--config' option to the 'run' script","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2017-09-23T19:55:56Z","receivedAt":"2017-09-23T19:56:03Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"It is error prone and tiring to use many long environment\nvariables to give parameters to the 'run' script.\n\nLet's make it easy to store some parameters in a config\nfile and to pass them to the run script.\n\nThe GIT_PERF_CONFIG_FILE variable will be set to the\nargument of the '--config' option. This variable is not\nused yet. It will be used in a following commit.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/perf/run | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/t/perf/run b/t/perf/run\nindex beb4acc0e428d..1e7c2a59e45dc 100755\n--- a/t/perf/run\n+++ b/t/perf/run\n@@ -2,9 +2,14 @@\n \n case \"$1\" in\n \t--help)\n-\t\techo \"usage: $0 [other_git_tree...] [--] [test_scripts]\"\n+\t\techo \"usage: $0 [--config file] [other_git_tree...] [--] [test_scripts]\"\n \t\texit 0\n \t\t;;\n+\t--config)\n+\t\tshift\n+\t\tGIT_PERF_CONFIG_FILE=$(cd \"$(dirname \"$1\")\"; pwd)/$(basename \"$1\")\n+\t\texport GIT_PERF_CONFIG_FILE\n+\t\tshift ;;\n esac\n \n die () {\n\n--\nhttps://github.com/git/git/pull/408\n"},{"id":"328740","messageId":"0102015eb04f89f3-1bd3aadc-9e0d-42a3-8a6c-386850872e6a-000000@eu-west-1.amazonses.com","threadId":"46819","inReplyTo":"0102015eb04f8927-439213ae-a464-4638-affa-f0d6484086c0-000000@eu-west-1.amazonses.com","subject":"[PATCH v2 4/9] perf/run: add calls to get_var_from_env_or_config()","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2017-09-23T19:55:56Z","receivedAt":"2017-09-23T19:56:07Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"These calls make it possible to have the make command or the\nmake options in a config file, instead of in environment\nvariables.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/perf/run | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/t/perf/run b/t/perf/run\nindex ad442fe64a828..6bd15e701756b 100755\n--- a/t/perf/run\n+++ b/t/perf/run\n@@ -116,6 +116,9 @@ export GIT_PERF_REPEAT_COUNT\n get_var_from_env_or_config \"GIT_PERF_DIRS_OR_REVS\" \"perf.dirsOrRevs\"\n set -- $GIT_PERF_DIRS_OR_REVS \"$@\"\n \n+get_var_from_env_or_config \"GIT_PERF_MAKE_COMMAND\" \"perf.makeCommand\"\n+get_var_from_env_or_config \"GIT_PERF_MAKE_OPTS\" \"perf.makeOpts\"\n+\n GIT_PERF_AGGREGATING_LATER=t\n export GIT_PERF_AGGREGATING_LATER\n \n\n--\nhttps://github.com/git/git/pull/408\n"},{"id":"328741","messageId":"0102015eb04f8a04-b3e697a7-eb71-4453-a5ae-692b523c6e29-000000@eu-west-1.amazonses.com","threadId":"46819","inReplyTo":"0102015eb04f8927-439213ae-a464-4638-affa-f0d6484086c0-000000@eu-west-1.amazonses.com","subject":"[PATCH v2 8/9] perf/run: show name of rev being built","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2017-09-23T19:55:56Z","receivedAt":"2017-09-23T19:56:09Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"It is nice for the user to not just show the sha1 of the\ncurrent revision being built but also the actual name of\nthis revision.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/perf/run | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/t/perf/run b/t/perf/run\nindex cb8687bfcf98d..43e4de49ef2be 100755\n--- a/t/perf/run\n+++ b/t/perf/run\n@@ -37,6 +37,7 @@ unpack_git_rev () {\n \n build_git_rev () {\n \trev=$1\n+\tname=\"$2\"\n \tfor config in config.mak config.mak.autogen config.status\n \tdo\n \t\tif test -e \"../../$config\"\n@@ -44,7 +45,7 @@ build_git_rev () {\n \t\t\tcp \"../../$config\" \"build/$rev/\"\n \t\tfi\n \tdone\n-\techo \"=== Building $rev ===\"\n+\techo \"=== Building $rev ($name) ===\"\n \t(\n \t\tcd build/$rev &&\n \t\tif test -n \"$GIT_PERF_MAKE_COMMAND\"\n@@ -71,7 +72,7 @@ run_dirs_helper () {\n \t\tif [ ! -d build/$rev ]; then\n \t\t\tunpack_git_rev $rev\n \t\tfi\n-\t\tbuild_git_rev $rev\n+\t\tbuild_git_rev $rev \"$mydir\"\n \t\tmydir=build/$rev\n \tfi\n \tif test \"$mydir\" = .; then\n\n--\nhttps://github.com/git/git/pull/408\n"},{"id":"328742","messageId":"0102015eb04f8a13-870eb283-049e-4d29-a3ef-b03205a21f26-000000@eu-west-1.amazonses.com","threadId":"46819","inReplyTo":"0102015eb04f8927-439213ae-a464-4638-affa-f0d6484086c0-000000@eu-west-1.amazonses.com","subject":"[PATCH v2 9/9] perf: store subsection results in \"test-results/$GIT_PERF_SUBSECTION/\"","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2017-09-23T19:55:56Z","receivedAt":"2017-09-23T19:56:12Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"When tests are run for a subsection defined in a config file, it is\nbetter if the results for the current subsection are not overwritting\nthe results of a previous subsection.\n\nSo let's store the results for a subsection in a subdirectory of\n\"test-results/\" with the subsection name.\n\nThe aggregate.perl, when it is run for a subsection, should then\naggregate the results found in \"test-results/$GIT_PERF_SUBSECTION/\".\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/perf/aggregate.perl | 11 ++++++++---\n t/perf/perf-lib.sh    |  1 +\n 2 files changed, 9 insertions(+), 3 deletions(-)\n\ndiff --git a/t/perf/aggregate.perl b/t/perf/aggregate.perl\nindex 1dbc85b21407d..e40120848837c 100755\n--- a/t/perf/aggregate.perl\n+++ b/t/perf/aggregate.perl\n@@ -69,12 +69,17 @@ sub format_times {\n \t@tests = glob \"p????-*.sh\";\n }\n \n+my $resultsdir = \"test-results\";\n+if ($ENV{GIT_PERF_SUBSECTION} ne \"\") {\n+\t$resultsdir .= \"/\" . $ENV{GIT_PERF_SUBSECTION};\n+}\n+\n my @subtests;\n my %shorttests;\n for my $t (@tests) {\n \t$t =~ s{(?:.*/)?(p(\\d+)-[^/]+)\\.sh$}{$1} or die \"bad test name: $t\";\n \tmy $n = $2;\n-\tmy $fname = \"test-results/$t.subtests\";\n+\tmy $fname = \"$resultsdir/$t.subtests\";\n \topen my $fp, \"<\", $fname or die \"cannot open $fname: $!\";\n \tfor (<$fp>) {\n \t\tchomp;\n@@ -98,7 +103,7 @@ sub read_descr {\n my %descrs;\n my $descrlen = 4; # \"Test\"\n for my $t (@subtests) {\n-\t$descrs{$t} = $shorttests{$t}.\": \".read_descr(\"test-results/$t.descr\");\n+\t$descrs{$t} = $shorttests{$t}.\": \".read_descr(\"$resultsdir/$t.descr\");\n \t$descrlen = length $descrs{$t} if length $descrs{$t}>$descrlen;\n }\n \n@@ -138,7 +143,7 @@ sub have_slash {\n \tmy $firstr;\n \tfor my $i (0..$#dirs) {\n \t\tmy $d = $dirs[$i];\n-\t\t$times{$prefixes{$d}.$t} = [get_times(\"test-results/$prefixes{$d}$t.times\")];\n+\t\t$times{$prefixes{$d}.$t} = [get_times(\"$resultsdir/$prefixes{$d}$t.times\")];\n \t\tmy ($r,$u,$s) = @{$times{$prefixes{$d}.$t}};\n \t\tmy $w = length format_times($r,$u,$s,$firstr);\n \t\t$colwidth[$i] = $w if $w > $colwidth[$i];\ndiff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh\nindex 2f88fc12a9b5c..e4c343a6b795b 100644\n--- a/t/perf/perf-lib.sh\n+++ b/t/perf/perf-lib.sh\n@@ -56,6 +56,7 @@ MODERN_GIT=$GIT_BUILD_DIR/bin-wrappers/git\n export MODERN_GIT\n \n perf_results_dir=$TEST_OUTPUT_DIRECTORY/test-results\n+test -n \"$GIT_PERF_SUBSECTION\" && perf_results_dir=\"$perf_results_dir/$GIT_PERF_SUBSECTION\"\n mkdir -p \"$perf_results_dir\"\n rm -f \"$perf_results_dir\"/$(basename \"$0\" .sh).subtests\n \n\n--\nhttps://github.com/git/git/pull/408\n"},{"id":"328743","messageId":"0102015eb04f89d7-11cb1e45-a3d5-49f4-9593-518411971e80-000000@eu-west-1.amazonses.com","threadId":"46819","inReplyTo":"0102015eb04f8927-439213ae-a464-4638-affa-f0d6484086c0-000000@eu-west-1.amazonses.com","subject":"[PATCH v2 2/9] perf/run: add get_var_from_env_or_config()","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2017-09-23T19:55:56Z","receivedAt":"2017-09-23T19:56:14Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Add get_var_from_env_or_config() to easily set variables\nfrom a config file if they are defined there and not already set.\n\nThis can also set them to a default value if one is provided.\n\nAs an example, use this function to set GIT_PERF_REPEAT_COUNT\nfrom the perf.repeatCount config option or from the default\nvalue.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/perf/perf-lib.sh |  3 ---\n t/perf/run         | 21 +++++++++++++++++++++\n 2 files changed, 21 insertions(+), 3 deletions(-)\n\ndiff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh\nindex b50211b2591d1..2f88fc12a9b5c 100644\n--- a/t/perf/perf-lib.sh\n+++ b/t/perf/perf-lib.sh\n@@ -59,9 +59,6 @@ perf_results_dir=$TEST_OUTPUT_DIRECTORY/test-results\n mkdir -p \"$perf_results_dir\"\n rm -f \"$perf_results_dir\"/$(basename \"$0\" .sh).subtests\n \n-if test -z \"$GIT_PERF_REPEAT_COUNT\"; then\n-\tGIT_PERF_REPEAT_COUNT=3\n-fi\n die_if_build_dir_not_repo () {\n \tif ! ( cd \"$TEST_DIRECTORY/..\" &&\n \t\t    git rev-parse --build-dir >/dev/null 2>&1 ); then\ndiff --git a/t/perf/run b/t/perf/run\nindex 1e7c2a59e45dc..41580ac6df44a 100755\n--- a/t/perf/run\n+++ b/t/perf/run\n@@ -34,6 +34,7 @@ unpack_git_rev () {\n \t(cd \"$(git rev-parse --show-cdup)\" && git archive --format=tar $rev) |\n \t(cd build/$rev && tar x)\n }\n+\n build_git_rev () {\n \trev=$1\n \tfor config in config.mak config.mak.autogen config.status\n@@ -92,6 +93,26 @@ run_dirs () {\n \tdone\n }\n \n+get_var_from_env_or_config () {\n+\tenv_var=\"$1\"\n+\tconf_var=\"$2\"\n+\t# $3 can be set to a default value\n+\n+\t# Do nothing if the env variable is already set\n+\teval \"test -z \\\"\\${$env_var+x}\\\"\" || return\n+\n+\t# Check if the variable is in the config file\n+\ttest -n \"$GIT_PERF_CONFIG_FILE\" &&\n+\tconf_value=$(git config -f \"$GIT_PERF_CONFIG_FILE\" \"$conf_var\") &&\n+\teval \"$env_var=\\\"$conf_value\\\"\" || {\n+\t\ttest -n \"${3+x}\" &&\n+\t\teval \"$env_var=\\\"$3\\\"\"\n+\t}\n+}\n+\n+get_var_from_env_or_config \"GIT_PERF_REPEAT_COUNT\" \"perf.repeatCount\" 3\n+export GIT_PERF_REPEAT_COUNT\n+\n GIT_PERF_AGGREGATING_LATER=t\n export GIT_PERF_AGGREGATING_LATER\n \n\n--\nhttps://github.com/git/git/pull/408\n"},{"id":"328744","messageId":"0102015eb04f89f3-1c6db13e-2a6c-47b8-9519-b27a6c91e420-000000@eu-west-1.amazonses.com","threadId":"46819","inReplyTo":"0102015eb04f8927-439213ae-a464-4638-affa-f0d6484086c0-000000@eu-west-1.amazonses.com","subject":"[PATCH v2 5/9] perf/run: add get_subsections()","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2017-09-23T19:55:56Z","receivedAt":"2017-09-23T19:56:16Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"This function makes it possible to find subsections, so that\nwe will be able to run different tests for different subsections\nin a later commit.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/perf/run | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/t/perf/run b/t/perf/run\nindex 6bd15e701756b..4c966c0ae420e 100755\n--- a/t/perf/run\n+++ b/t/perf/run\n@@ -93,6 +93,13 @@ run_dirs () {\n \tdone\n }\n \n+get_subsections () {\n+\tsection=\"$1\"\n+\ttest -z \"$GIT_PERF_CONFIG_FILE\" && return\n+\tgit config -f \"$GIT_PERF_CONFIG_FILE\" --name-only --get-regex \"$section\\..*\\.[^.]+\" |\n+\tsed -e \"s/$section\\.\\(.*\\)\\..*/\\1/\" | sort | uniq\n+}\n+\n get_var_from_env_or_config () {\n \tenv_var=\"$1\"\n \tconf_var=\"$2\"\n\n--\nhttps://github.com/git/git/pull/408\n"},{"id":"328745","messageId":"0102015eb04f8a10-6bd51c94-e861-4302-8325-71ce93a07ede-000000@eu-west-1.amazonses.com","threadId":"46819","inReplyTo":"0102015eb04f8927-439213ae-a464-4638-affa-f0d6484086c0-000000@eu-west-1.amazonses.com","subject":"[PATCH v2 6/9] perf/run: update get_var_from_env_or_config() for subsections","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2017-09-23T19:55:56Z","receivedAt":"2017-09-23T19:56:19Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"As we will set some config options in subsections, let's\nteach get_var_from_env_or_config() to get the config options\nfrom the subsections if they are set there.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/perf/run | 32 ++++++++++++++++++++------------\n 1 file changed, 20 insertions(+), 12 deletions(-)\n\ndiff --git a/t/perf/run b/t/perf/run\nindex 4c966c0ae420e..bd39398b9cc7d 100755\n--- a/t/perf/run\n+++ b/t/perf/run\n@@ -102,29 +102,37 @@ get_subsections () {\n \n get_var_from_env_or_config () {\n \tenv_var=\"$1\"\n-\tconf_var=\"$2\"\n-\t# $3 can be set to a default value\n+\tconf_sec=\"$2\"\n+\tconf_var=\"$3\"\n+\t# $4 can be set to a default value\n \n \t# Do nothing if the env variable is already set\n \teval \"test -z \\\"\\${$env_var+x}\\\"\" || return\n \n+\ttest -z \"$GIT_PERF_CONFIG_FILE\" && return\n+\n \t# Check if the variable is in the config file\n-\ttest -n \"$GIT_PERF_CONFIG_FILE\" &&\n-\tconf_value=$(git config -f \"$GIT_PERF_CONFIG_FILE\" \"$conf_var\") &&\n-\teval \"$env_var=\\\"$conf_value\\\"\" || {\n-\t\ttest -n \"${3+x}\" &&\n-\t\teval \"$env_var=\\\"$3\\\"\"\n-\t}\n+\tif test -n \"$GIT_PERF_SUBSECTION\"\n+\tthen\n+\t\tvar=\"$conf_sec.$GIT_PERF_SUBSECTION.$conf_var\"\n+\t\tconf_value=$(git config -f \"$GIT_PERF_CONFIG_FILE\" \"$var\") &&\n+\t\teval \"$env_var=\\\"$conf_value\\\"\" && return\n+\tfi\n+\tvar=\"$conf_sec.$conf_var\"\n+\tconf_value=$(git config -f \"$GIT_PERF_CONFIG_FILE\" \"$var\") &&\n+\teval \"$env_var=\\\"$conf_value\\\"\" && return\n+\n+\ttest -n \"${4+x}\" && eval \"$env_var=\\\"$4\\\"\"\n }\n \n-get_var_from_env_or_config \"GIT_PERF_REPEAT_COUNT\" \"perf.repeatCount\" 3\n+get_var_from_env_or_config \"GIT_PERF_REPEAT_COUNT\" \"perf\" \"repeatCount\" 3\n export GIT_PERF_REPEAT_COUNT\n \n-get_var_from_env_or_config \"GIT_PERF_DIRS_OR_REVS\" \"perf.dirsOrRevs\"\n+get_var_from_env_or_config \"GIT_PERF_DIRS_OR_REVS\" \"perf\" \"dirsOrRevs\"\n set -- $GIT_PERF_DIRS_OR_REVS \"$@\"\n \n-get_var_from_env_or_config \"GIT_PERF_MAKE_COMMAND\" \"perf.makeCommand\"\n-get_var_from_env_or_config \"GIT_PERF_MAKE_OPTS\" \"perf.makeOpts\"\n+get_var_from_env_or_config \"GIT_PERF_MAKE_COMMAND\" \"perf\" \"makeCommand\"\n+get_var_from_env_or_config \"GIT_PERF_MAKE_OPTS\" \"perf\" \"makeOpts\"\n \n GIT_PERF_AGGREGATING_LATER=t\n export GIT_PERF_AGGREGATING_LATER\n\n--\nhttps://github.com/git/git/pull/408\n"},{"id":"328746","messageId":"0102015eb04f89e4-aee35112-c651-47b5-973d-3fae48ff6ede-000000@eu-west-1.amazonses.com","threadId":"46819","inReplyTo":"0102015eb04f8927-439213ae-a464-4638-affa-f0d6484086c0-000000@eu-west-1.amazonses.com","subject":"[PATCH v2 3/9] perf/run: add GIT_PERF_DIRS_OR_REVS","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2017-09-23T19:55:56Z","receivedAt":"2017-09-23T19:56:23Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"This environment variable can be set to some revisions or\ndirectories whose Git versions should be tested, in addition\nto the revisions or directories passed as arguments to the\n'run' script.\n\nThis enables a \"perf.dirsOrRevs\" configuration variable to\nbe used to set revisions or directories whose Git versions\nshould be tested.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/perf/run | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/t/perf/run b/t/perf/run\nindex 41580ac6df44a..ad442fe64a828 100755\n--- a/t/perf/run\n+++ b/t/perf/run\n@@ -113,6 +113,9 @@ get_var_from_env_or_config () {\n get_var_from_env_or_config \"GIT_PERF_REPEAT_COUNT\" \"perf.repeatCount\" 3\n export GIT_PERF_REPEAT_COUNT\n \n+get_var_from_env_or_config \"GIT_PERF_DIRS_OR_REVS\" \"perf.dirsOrRevs\"\n+set -- $GIT_PERF_DIRS_OR_REVS \"$@\"\n+\n GIT_PERF_AGGREGATING_LATER=t\n export GIT_PERF_AGGREGATING_LATER\n \n\n--\nhttps://github.com/git/git/pull/408\n"},{"id":"328747","messageId":"0102015eb04f8a12-84068e82-d13c-48d5-8147-3525b95a5481-000000@eu-west-1.amazonses.com","threadId":"46819","inReplyTo":"0102015eb04f8927-439213ae-a464-4638-affa-f0d6484086c0-000000@eu-west-1.amazonses.com","subject":"[PATCH v2 7/9] perf/run: add run_subsection()","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2017-09-23T19:55:56Z","receivedAt":"2017-09-23T19:56:25Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Let's actually use the subsections we find in the config file\nto run the perf tests separately for each subsection.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/perf/run | 47 +++++++++++++++++++++++++++++++++++------------\n 1 file changed, 35 insertions(+), 12 deletions(-)\n\ndiff --git a/t/perf/run b/t/perf/run\nindex bd39398b9cc7d..cb8687bfcf98d 100755\n--- a/t/perf/run\n+++ b/t/perf/run\n@@ -125,23 +125,46 @@ get_var_from_env_or_config () {\n \ttest -n \"${4+x}\" && eval \"$env_var=\\\"$4\\\"\"\n }\n \n-get_var_from_env_or_config \"GIT_PERF_REPEAT_COUNT\" \"perf\" \"repeatCount\" 3\n-export GIT_PERF_REPEAT_COUNT\n+run_subsection () {\n+\tget_var_from_env_or_config \"GIT_PERF_REPEAT_COUNT\" \"perf\" \"repeatCount\" 3\n+\texport GIT_PERF_REPEAT_COUNT\n \n-get_var_from_env_or_config \"GIT_PERF_DIRS_OR_REVS\" \"perf\" \"dirsOrRevs\"\n-set -- $GIT_PERF_DIRS_OR_REVS \"$@\"\n+\tget_var_from_env_or_config \"GIT_PERF_DIRS_OR_REVS\" \"perf\" \"dirsOrRevs\"\n+\tset -- $GIT_PERF_DIRS_OR_REVS \"$@\"\n \n-get_var_from_env_or_config \"GIT_PERF_MAKE_COMMAND\" \"perf\" \"makeCommand\"\n-get_var_from_env_or_config \"GIT_PERF_MAKE_OPTS\" \"perf\" \"makeOpts\"\n+\tget_var_from_env_or_config \"GIT_PERF_MAKE_COMMAND\" \"perf\" \"makeCommand\"\n+\tget_var_from_env_or_config \"GIT_PERF_MAKE_OPTS\" \"perf\" \"makeOpts\"\n \n-GIT_PERF_AGGREGATING_LATER=t\n-export GIT_PERF_AGGREGATING_LATER\n+\tGIT_PERF_AGGREGATING_LATER=t\n+\texport GIT_PERF_AGGREGATING_LATER\n+\n+\tif test $# = 0 -o \"$1\" = -- -o -f \"$1\"; then\n+\t\tset -- . \"$@\"\n+\tfi\n+\n+\trun_dirs \"$@\"\n+\t./aggregate.perl \"$@\"\n+}\n \n cd \"$(dirname $0)\"\n . ../../GIT-BUILD-OPTIONS\n \n-if test $# = 0 -o \"$1\" = -- -o -f \"$1\"; then\n-\tset -- . \"$@\"\n+mkdir -p test-results\n+get_subsections \"perf\" >test-results/run_subsections.names\n+\n+if test $(wc -l <test-results/run_subsections.names) -eq 0\n+then\n+\t(\n+\t\trun_subsection \"$@\"\n+\t)\n+else\n+\twhile read -r subsec\n+\tdo\n+\t\t(\n+\t\t\tGIT_PERF_SUBSECTION=\"$subsec\"\n+\t\t\texport GIT_PERF_SUBSECTION\n+\t\t\techo \"======== Run for subsection '$GIT_PERF_SUBSECTION' ========\"\n+\t\t\trun_subsection \"$@\"\n+\t\t)\n+\tdone <test-results/run_subsections.names\n fi\n-run_dirs \"$@\"\n-./aggregate.perl \"$@\"\n\n--\nhttps://github.com/git/git/pull/408\n"},{"id":"330442","messageId":"xmqqy3obslyb.fsf@gitster.mtv.corp.google.com","threadId":"46819","inReplyTo":"0102015eb04f8927-439213ae-a464-4638-affa-f0d6484086c0-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH v2 1/9] perf/run: add '--config' option to the 'run' script","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-10-16T05:25:48Z","receivedAt":"2017-10-16T05:27:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <chriscool@tuxfamily.org> writes:\n\n> It is error prone and tiring to use many long environment\n> variables to give parameters to the 'run' script.\n\nThis topic has been sitting in the list archive without getting much\nreaction from list participants.  Is anybody happy with these\npatches?\n"},{"id":"330598","messageId":"20171018105801.GF19335@alpha.vpn.ikke.info","threadId":"46819","inReplyTo":"0102015eb04f8927-439213ae-a464-4638-affa-f0d6484086c0-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH v2 1/9] perf/run: add '--config' option to the 'run' script","fromName":"Kevin Daudt","fromEmail":"me@ikke.info","sentAt":"2017-10-18T10:58:01Z","receivedAt":"2017-10-18T10:58:08Z","isPatch":true,"sender":{"key":"me@ikke.info","avatar":"https://avatars.githubusercontent.com/u/135698?v=4"},"body":"On Sat, Sep 23, 2017 at 07:55:56PM +0000, Christian Couder wrote:\n> It is error prone and tiring to use many long environment\n> variables to give parameters to the 'run' script.\n> \n> Let's make it easy to store some parameters in a config\n> file and to pass them to the run script.\n> \n> The GIT_PERF_CONFIG_FILE variable will be set to the\n> argument of the '--config' option. This variable is not\n> used yet. It will be used in a following commit.\n> \n> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n> ---\n>  t/perf/run | 7 ++++++-\n>  1 file changed, 6 insertions(+), 1 deletion(-)\n> \n> diff --git a/t/perf/run b/t/perf/run\n> index beb4acc0e428d..1e7c2a59e45dc 100755\n> --- a/t/perf/run\n> +++ b/t/perf/run\n> @@ -2,9 +2,14 @@\n>  \n>  case \"$1\" in\n>  \t--help)\n> -\t\techo \"usage: $0 [other_git_tree...] [--] [test_scripts]\"\n> +\t\techo \"usage: $0 [--config file] [other_git_tree...] [--] [test_scripts]\"\n>  \t\texit 0\n>  \t\t;;\n> +\t--config)\n> +\t\tshift\n> +\t\tGIT_PERF_CONFIG_FILE=$(cd \"$(dirname \"$1\")\"; pwd)/$(basename \"$1\")\n\nIs the idea of this construct to do some kind of normalization?\nOtherwise it seems to just result in $1 again.\n\n> +\t\texport GIT_PERF_CONFIG_FILE\n> +\t\tshift ;;\n>  esac\n>  \n>  die () {\n> \n> --\n> https://github.com/git/git/pull/408\n"},{"id":"330613","messageId":"CAP8UFD2D7hUVkE=5bpk7sn8DnUgtwZmj-Q4xHCej279LJvMKyg@mail.gmail.com","threadId":"46819","inReplyTo":"20171018105801.GF19335@alpha.vpn.ikke.info","subject":"Re: [PATCH v2 1/9] perf/run: add '--config' option to the 'run' script","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2017-10-18T21:25:49Z","receivedAt":"2017-10-18T21:25:57Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Wed, Oct 18, 2017 at 12:58 PM, Kevin Daudt <me@ikke.info> wrote:\n> On Sat, Sep 23, 2017 at 07:55:56PM +0000, Christian Couder wrote:\n\n>> diff --git a/t/perf/run b/t/perf/run\n>> index beb4acc0e428d..1e7c2a59e45dc 100755\n>> --- a/t/perf/run\n>> +++ b/t/perf/run\n>> @@ -2,9 +2,14 @@\n>>\n>>  case \"$1\" in\n>>       --help)\n>> -             echo \"usage: $0 [other_git_tree...] [--] [test_scripts]\"\n>> +             echo \"usage: $0 [--config file] [other_git_tree...] [--] [test_scripts]\"\n>>               exit 0\n>>               ;;\n>> +     --config)\n>> +             shift\n>> +             GIT_PERF_CONFIG_FILE=$(cd \"$(dirname \"$1\")\"; pwd)/$(basename \"$1\")\n>\n> Is the idea of this construct to do some kind of normalization?\n> Otherwise it seems to just result in $1 again.\n\nYeah, the idea is to get a full path when you are given a relative path.\n"},{"id":"332745","messageId":"CAP8UFD2gqwtmGVkkqh3JKYf8X9innfJVV2-+FWTVyjXftKiYxg@mail.gmail.com","threadId":"46819","inReplyTo":"xmqqy3obslyb.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2 1/9] perf/run: add '--config' option to the 'run' script","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2017-11-17T07:58:52Z","receivedAt":"2017-11-17T07:58:59Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Mon, Oct 16, 2017 at 7:25 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Christian Couder <chriscool@tuxfamily.org> writes:\n>\n>> It is error prone and tiring to use many long environment\n>> variables to give parameters to the 'run' script.\n>\n> This topic has been sitting in the list archive without getting much\n> reaction from list participants.  Is anybody happy with these\n> patches?\n\n(Sorry for not responding earlier to this.)\n\nHopefully AEvar CC'ed will take a look at this soon.\n"},{"id":"333428","messageId":"87wp2gug0z.fsf@evledraar.booking.com","threadId":"46819","inReplyTo":"xmqqy3obslyb.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2 1/9] perf/run: add '--config' option to the 'run' script","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-11-24T10:28:44Z","receivedAt":"2017-11-24T10:28:55Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Oct 16 2017, Junio C. Hamano jotted:\n\n> Christian Couder <chriscool@tuxfamily.org> writes:\n>\n>> It is error prone and tiring to use many long environment\n>> variables to give parameters to the 'run' script.\n>\n> This topic has been sitting in the list archive without getting much\n> reaction from list participants.  Is anybody happy with these\n> patches?\n\nVery late reply, sorry. But I've looked these over and they look good to\nme.\n"}]}