{"thread":{"id":"42652","subject":"[PATCH] perf: accommodate for MacOSX","startedAt":"2016-06-18T13:05:47Z","lastAt":"2016-06-21T18:39:15Z","messageCount":11,"participants":["Johannes Schindelin","Lars Schneider","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"289575","messageId":"ae429d2481111f7ad1927ef22e3a691d4c99ebd7.1466254995.git.johannes.schindelin@gmx.de","threadId":"42652","inReplyTo":null,"subject":"[PATCH] perf: accommodate for MacOSX","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-18T13:03:55Z","receivedAt":"2016-06-18T13:05:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"As this developer has no access to MacOSX developer setups anymore,\nTravis becomes the best bet to run performance tests on that OS.\n\nHowever, on MacOSX /usr/bin/time is that good old BSD executable that\nno Linux user cares about, as demonstrated by the perf-lib.sh's use\nof GNU-ish extensions. And by the hard-coded path.\n\nLet's just work around this issue by using gtime on MacOSX, the\nHomebrew-provided GNU implementation onto which pretty much every\nMacOSX power user falls back anyway.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\nPublished-As: https://github.com/dscho/git/releases/tag/perf-macosx-v1\n\n\tThis is another of those patches that came up in my rebase--helper\n\twork, even if it is not quite obvious from the patch ;-)\n\n .travis.yml        | 2 +-\n t/perf/perf-lib.sh | 6 +++++-\n 2 files changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/.travis.yml b/.travis.yml\nindex c20ec54..0e569bc 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -82,7 +82,7 @@ before_install:\n       brew tap homebrew/binary --quiet\n       brew_force_set_latest_binary_hash perforce\n       brew_force_set_latest_binary_hash perforce-server\n-      brew install git-lfs perforce-server perforce gettext\n+      brew install git-lfs perforce-server perforce gettext gnu-time\n       brew link --force gettext\n       ;;\n     esac;\ndiff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh\nindex 18c363e..773f955 100644\n--- a/t/perf/perf-lib.sh\n+++ b/t/perf/perf-lib.sh\n@@ -127,11 +127,15 @@ test_checkout_worktree () {\n # Performance tests should never fail.  If they do, stop immediately\n immediate=t\n \n+# Perf tests require GNU time\n+case \"$(uname -s)\" in Darwin) GTIME=\"${GTIME:-gtime}\";; esac\n+GTIME=\"${GTIME:-/usr/bin/time}\"\n+\n test_run_perf_ () {\n \ttest_cleanup=:\n \ttest_export_=\"test_cleanup\"\n \texport test_cleanup test_export_\n-\t/usr/bin/time -f \"%E %U %S\" -o test_time.$i \"$SHELL\" -c '\n+\t\"$GTIME\" -f \"%E %U %S\" -o test_time.$i \"$SHELL\" -c '\n . '\"$TEST_DIRECTORY\"/test-lib-functions.sh'\n test_export () {\n \t[ $# != 0 ] || return 0\n-- \n2.9.0.119.gb7b8d21\n\nbase-commit: 05219a1276341e72d8082d76b7f5ed394b7437a4\n"},{"id":"289629","messageId":"9A11C3D1-3DAC-489F-BDF9-F4D409E8D3F7@gmail.com","threadId":"42652","inReplyTo":"ae429d2481111f7ad1927ef22e3a691d4c99ebd7.1466254995.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH] perf: accommodate for MacOSX","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-06-19T16:56:46Z","receivedAt":"2016-06-19T16:56:54Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 18 Jun 2016, at 15:03, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:\n> \n> As this developer has no access to MacOSX developer setups anymore,\n> Travis becomes the best bet to run performance tests on that OS.\nWe don't run the performance tests on Travis CI right now.\nMaybe we should? With your patch below it should work, right?\n\nI only saw one error on my local OS X machine here:\nhttps://github.com/git/git/blob/05219a1276341e72d8082d76b7f5ed394b7437a4/t/perf/p0000-perf-lib-sanity.sh#L26\n\nDoes the export of foo not work properly on OS X? \"$foo\" is empty...\n\n- Lars\n\n\n> However, on MacOSX /usr/bin/time is that good old BSD executable that\n> no Linux user cares about, as demonstrated by the perf-lib.sh's use\n> of GNU-ish extensions. And by the hard-coded path.\n> \n> Let's just work around this issue by using gtime on MacOSX, the\n> Homebrew-provided GNU implementation onto which pretty much every\n> MacOSX power user falls back anyway.\n> \n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n> Published-As: https://github.com/dscho/git/releases/tag/perf-macosx-v1\n> \n> \tThis is another of those patches that came up in my rebase--helper\n> \twork, even if it is not quite obvious from the patch ;-)\n> \n> .travis.yml        | 2 +-\n> t/perf/perf-lib.sh | 6 +++++-\n> 2 files changed, 6 insertions(+), 2 deletions(-)\n> \n> diff --git a/.travis.yml b/.travis.yml\n> index c20ec54..0e569bc 100644\n> --- a/.travis.yml\n> +++ b/.travis.yml\n> @@ -82,7 +82,7 @@ before_install:\n>       brew tap homebrew/binary --quiet\n>       brew_force_set_latest_binary_hash perforce\n>       brew_force_set_latest_binary_hash perforce-server\n> -      brew install git-lfs perforce-server perforce gettext\n> +      brew install git-lfs perforce-server perforce gettext gnu-time\n>       brew link --force gettext\n>       ;;\n>     esac;\n> diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh\n> index 18c363e..773f955 100644\n> --- a/t/perf/perf-lib.sh\n> +++ b/t/perf/perf-lib.sh\n> @@ -127,11 +127,15 @@ test_checkout_worktree () {\n> # Performance tests should never fail.  If they do, stop immediately\n> immediate=t\n> \n> +# Perf tests require GNU time\n> +case \"$(uname -s)\" in Darwin) GTIME=\"${GTIME:-gtime}\";; esac\n> +GTIME=\"${GTIME:-/usr/bin/time}\"\n> +\n> test_run_perf_ () {\n> \ttest_cleanup=:\n> \ttest_export_=\"test_cleanup\"\n> \texport test_cleanup test_export_\n> -\t/usr/bin/time -f \"%E %U %S\" -o test_time.$i \"$SHELL\" -c '\n> +\t\"$GTIME\" -f \"%E %U %S\" -o test_time.$i \"$SHELL\" -c '\n> . '\"$TEST_DIRECTORY\"/test-lib-functions.sh'\n> test_export () {\n> \t[ $# != 0 ] || return 0\n> -- \n> 2.9.0.119.gb7b8d21\n> \n> base-commit: 05219a1276341e72d8082d76b7f5ed394b7437a4\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n"},{"id":"289656","messageId":"alpine.DEB.2.20.1606200840350.22630@virtualbox","threadId":"42652","inReplyTo":"9A11C3D1-3DAC-489F-BDF9-F4D409E8D3F7@gmail.com","subject":"Re: [PATCH] perf: accommodate for MacOSX","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-20T06:45:29Z","receivedAt":"2016-06-20T06:53:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Lars,\n\nOn Sun, 19 Jun 2016, Lars Schneider wrote:\n\n> > On 18 Jun 2016, at 15:03, Johannes Schindelin\n> > <johannes.schindelin@gmx.de> wrote:\n> > \n> > As this developer has no access to MacOSX developer setups anymore,\n> > Travis becomes the best bet to run performance tests on that OS.\n>\n> We don't run the performance tests on Travis CI right now.\n> Maybe we should? With your patch below it should work, right?\n\nIt *should* work, but I'd be reluctant to run them as part of the CI: we\nhave no real chance to catch perf regressions as of now. So all it would\ndo would be to add load to Travis.\n\n> I only saw one error on my local OS X machine here:\n> https://github.com/git/git/blob/05219a1276341e72d8082d76b7f5ed394b7437a4/t/perf/p0000-perf-lib-sanity.sh#L26\n\nYeah, well, I should have been clearer in my commit message: this patch\nallows the perf tests to *run*, not to *pass*... ;-)\n\n> Does the export of foo not work properly on OS X? \"$foo\" is empty...\n\nSorry, as I said: I no longer have access to a dev setup running MacOSX.\n\nCiao,\nDscho\n\nP.S.: Please save me time by deleting the remainder of the quoted mail\nwhen it is irrelevant to your reply. Thanks!\n"},{"id":"289700","messageId":"xmqqa8iftzex.fsf@gitster.mtv.corp.google.com","threadId":"42652","inReplyTo":"alpine.DEB.2.20.1606200840350.22630@virtualbox","subject":"Re: [PATCH] perf: accommodate for MacOSX","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-06-20T19:48:06Z","receivedAt":"2016-06-20T19:48:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Sun, 19 Jun 2016, Lars Schneider wrote:\n>\n>> > On 18 Jun 2016, at 15:03, Johannes Schindelin\n>> > <johannes.schindelin@gmx.de> wrote:\n>> > \n>> > As this developer has no access to MacOSX developer setups anymore,\n>> > Travis becomes the best bet to run performance tests on that OS.\n>>\n>> We don't run the performance tests on Travis CI right now.\n>> Maybe we should? With your patch below it should work, right?\n> ...\n>\n> Yeah, well, I should have been clearer in my commit message: this patch\n> allows the perf tests to *run*, not to *pass*... ;-)\n\nOK, Lars, do we still want to take this patch?  I am leaning towards\ntaking it, if only to motivate interested others with OS X to look\ninto making the perf tests to actually run.\n"},{"id":"289733","messageId":"F67587B5-0EA8-4F2F-AADB-4343B4FEEA21@gmail.com","threadId":"42652","inReplyTo":"xmqqa8iftzex.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] perf: accommodate for MacOSX","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-06-21T07:57:36Z","receivedAt":"2016-06-21T07:57:52Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 20 Jun 2016, at 21:48, Junio C Hamano <gitster@pobox.com> wrote:\n> \n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n>> On Sun, 19 Jun 2016, Lars Schneider wrote:\n>> \n>>>> On 18 Jun 2016, at 15:03, Johannes Schindelin\n>>>> <johannes.schindelin@gmx.de> wrote:\n>>>> \n>>>> As this developer has no access to MacOSX developer setups anymore,\n>>>> Travis becomes the best bet to run performance tests on that OS.\n>>> \n>>> We don't run the performance tests on Travis CI right now.\n>>> Maybe we should? With your patch below it should work, right?\n>> ...\n>> \n>> Yeah, well, I should have been clearer in my commit message: this patch\n>> allows the perf tests to *run*, not to *pass*... ;-)\n> \n> OK, Lars, do we still want to take this patch?  I am leaning towards\n> taking it, if only to motivate interested others with OS X to look\n> into making the perf tests to actually run.\n\nI think we definitively should take the \"perf-lib.sh\" part of the patch\nas this makes the perf test run on OSX and therefore is a strict\nimprovement.\n\nIf we don't run any perf tests by default on Travis CI then I wouldn't \ntake the \".travis.yml\" part of the patch just to keep our Travis CI\nsetup as lean as possible. Running perf tests on Travis CI is probably\nbogus anyways because we never know on what hardware our jobs run\nand what other jobs run in parallel on that hardware.\n\n- Lars\n"},{"id":"289760","messageId":"alpine.DEB.2.20.1606211350470.22630@virtualbox","threadId":"42652","inReplyTo":"F67587B5-0EA8-4F2F-AADB-4343B4FEEA21@gmail.com","subject":"Re: [PATCH] perf: accommodate for MacOSX","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-21T11:55:00Z","receivedAt":"2016-06-21T11:57:32Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Lars,\n\nOn Tue, 21 Jun 2016, Lars Schneider wrote:\n\n> > On 20 Jun 2016, at 21:48, Junio C Hamano <gitster@pobox.com> wrote:\n> > \n> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> > \n> >> On Sun, 19 Jun 2016, Lars Schneider wrote:\n> >> \n> >>>> On 18 Jun 2016, at 15:03, Johannes Schindelin\n> >>>> <johannes.schindelin@gmx.de> wrote:\n> >>>> \n> >>>> As this developer has no access to MacOSX developer setups anymore,\n> >>>> Travis becomes the best bet to run performance tests on that OS.\n> >>> \n> >>> We don't run the performance tests on Travis CI right now.\n> >>> Maybe we should? With your patch below it should work, right?\n> >> ...\n> >> \n> >> Yeah, well, I should have been clearer in my commit message: this patch\n> >> allows the perf tests to *run*, not to *pass*... ;-)\n> > \n> > OK, Lars, do we still want to take this patch?  I am leaning towards\n> > taking it, if only to motivate interested others with OS X to look\n> > into making the perf tests to actually run.\n> \n> I think we definitively should take the \"perf-lib.sh\" part of the patch\n> as this makes the perf test run on OSX and therefore is a strict\n> improvement.\n\nYes, it was meant as the starting point to get more things to run on\nMacOSX.\n\n> If we don't run any perf tests by default on Travis CI then I wouldn't\n> take the \".travis.yml\" part of the patch just to keep our Travis CI\n> setup as lean as possible.\n\nMaybe commented-out, so that people like me have a chance to use Travis\nfor MacOSX perf testing?\n\n> Running perf tests on Travis CI is probably bogus anyways because we\n> never know on what hardware our jobs run and what other jobs run in\n> parallel on that hardware.\n\nWhile I agree that the absolute timings cannot be trusted, I have to point\nout that the relative timings on Linux at least are consistent with what I\ncould test locally.\n\nCould you let me know whether a commented-out\n\n\t# Uncomment this if you want to run perf tests:\n\t# brew install gnu-time\n\nwould be acceptable? I will reroll the patch accordingly.\n\nCiao,\nDscho\n"},{"id":"289767","messageId":"CD0404AE-529B-44B7-AE05-022D3062E596@gmail.com","threadId":"42652","inReplyTo":"alpine.DEB.2.20.1606211350470.22630@virtualbox","subject":"Re: [PATCH] perf: accommodate for MacOSX","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-06-21T12:49:00Z","receivedAt":"2016-06-21T12:49:10Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 21 Jun 2016, at 13:55, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n>> ...\n>> I think we definitively should take the \"perf-lib.sh\" part of the patch\n>> as this makes the perf test run on OSX and therefore is a strict\n>> improvement.\n> \n> Yes, it was meant as the starting point to get more things to run on\n> MacOSX.\n> \n>> If we don't run any perf tests by default on Travis CI then I wouldn't\n>> take the \".travis.yml\" part of the patch just to keep our Travis CI\n>> setup as lean as possible.\n> \n> Maybe commented-out, so that people like me have a chance to use Travis\n> for MacOSX perf testing?\n> \n>> Running perf tests on Travis CI is probably bogus anyways because we\n>> never know on what hardware our jobs run and what other jobs run in\n>> parallel on that hardware.\n> \n> While I agree that the absolute timings cannot be trusted, I have to point\n> out that the relative timings on Linux at least are consistent with what I\n> could test locally.\n> \n> Could you let me know whether a commented-out\n> \n> \t# Uncomment this if you want to run perf tests:\n> \t# brew install gnu-time\n> \n> would be acceptable? I will reroll the patch accordingly.\n\nCommented-out would be fine with me!\n\nIndependent of your patch:\nGiven that the relative timings are consistent for you. Maybe there is\nvalue to run the performance tests (e.g. only on the master branch)\nin a separate Travis job. Then we could chart the timings over releases.\nI dunno.\n\n- Lars"},{"id":"289768","messageId":"alpine.DEB.2.20.1606211548230.22630@virtualbox","threadId":"42652","inReplyTo":"CD0404AE-529B-44B7-AE05-022D3062E596@gmail.com","subject":"Re: [PATCH] perf: accommodate for MacOSX","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-21T13:50:15Z","receivedAt":"2016-06-21T13:52:41Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Lars,\n\nOn Tue, 21 Jun 2016, Lars Schneider wrote:\n\n> > On 21 Jun 2016, at 13:55, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > \n> >> ...\n> >> If we don't run any perf tests by default on Travis CI then I wouldn't\n> >> take the \".travis.yml\" part of the patch just to keep our Travis CI\n> >> setup as lean as possible.\n> > \n> > Maybe commented-out, so that people like me have a chance to use Travis\n> > for MacOSX perf testing?\n> > \n> > Could you let me know whether a commented-out\n> > \n> > \t# Uncomment this if you want to run perf tests:\n> > \t# brew install gnu-time\n> > \n> > would be acceptable? I will reroll the patch accordingly.\n> \n> Commented-out would be fine with me!\n\nOkay! Updated patch coming in a moment.\n\n> >> Running perf tests on Travis CI is probably bogus anyways because we\n> >> never know on what hardware our jobs run and what other jobs run in\n> >> parallel on that hardware.\n> > \n> > While I agree that the absolute timings cannot be trusted, I have to point\n> > out that the relative timings on Linux at least are consistent with what I\n> > could test locally.\n>\n> Given that the relative timings are consistent for you. Maybe there is\n> value to run the performance tests (e.g. only on the master branch)\n> in a separate Travis job. Then we could chart the timings over releases.\n> I dunno.\n\nSure, that would be a fine addition, if there is a way, somehow, to chart\nthe timings (keep in mind that Travis runs for each and every iteration of\neach and every PR, in addition to the branch updates).\n\nI do have enough on my plate, though, so I will have to hope that somebody\nelse picks this up.\n\nCiao,\nDscho\n"},{"id":"289770","messageId":"fa788ff09727fc37d8e799dbf1a92e4bba4152c9.1466517188.git.johannes.schindelin@gmx.de","threadId":"42652","inReplyTo":"ae429d2481111f7ad1927ef22e3a691d4c99ebd7.1466254995.git.johannes.schindelin@gmx.de","subject":"[PATCH v2] perf: accommodate for MacOSX","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-21T13:53:43Z","receivedAt":"2016-06-21T13:55:24Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"As this developer has no access to MacOSX developer setups anymore,\nTravis becomes the best bet to run performance tests on that OS.\n\nHowever, on MacOSX /usr/bin/time is that good old BSD executable that\nno Linux user cares about, as demonstrated by the perf-lib.sh's use\nof GNU-ish extensions. And by the hard-coded path.\n\nLet's just work around this issue by using gtime on MacOSX, the\nHomebrew-provided GNU implementation onto which pretty much every\nMacOSX power user falls back anyway.\n\nTo help other developers use Travis to run performance tests on\nMacOSX, the .travis.yml file now sports a commented-out line that\ninstalls GNU time via Homebrew.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\nPublished-As: https://github.com/dscho/git/releases/tag/perf-macosx-v2\n .travis.yml        | 2 ++\n t/perf/perf-lib.sh | 6 +++++-\n 2 files changed, 7 insertions(+), 1 deletion(-)\nInterdiff vs v1:\n\n diff --git a/.travis.yml b/.travis.yml\n index 0e569bc..c2b76f9 100644\n --- a/.travis.yml\n +++ b/.travis.yml\n @@ -82,7 +82,9 @@ before_install:\n        brew tap homebrew/binary --quiet\n        brew_force_set_latest_binary_hash perforce\n        brew_force_set_latest_binary_hash perforce-server\n -      brew install git-lfs perforce-server perforce gettext gnu-time\n +      # Uncomment this if you want to run perf tests:\n +      # brew install gnu-time\n +      brew install git-lfs perforce-server perforce gettext\n        brew link --force gettext\n        ;;\n      esac;\n\n\ndiff --git a/.travis.yml b/.travis.yml\nindex c20ec54..c2b76f9 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -82,6 +82,8 @@ before_install:\n       brew tap homebrew/binary --quiet\n       brew_force_set_latest_binary_hash perforce\n       brew_force_set_latest_binary_hash perforce-server\n+      # Uncomment this if you want to run perf tests:\n+      # brew install gnu-time\n       brew install git-lfs perforce-server perforce gettext\n       brew link --force gettext\n       ;;\ndiff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh\nindex 18c363e..773f955 100644\n--- a/t/perf/perf-lib.sh\n+++ b/t/perf/perf-lib.sh\n@@ -127,11 +127,15 @@ test_checkout_worktree () {\n # Performance tests should never fail.  If they do, stop immediately\n immediate=t\n \n+# Perf tests require GNU time\n+case \"$(uname -s)\" in Darwin) GTIME=\"${GTIME:-gtime}\";; esac\n+GTIME=\"${GTIME:-/usr/bin/time}\"\n+\n test_run_perf_ () {\n \ttest_cleanup=:\n \ttest_export_=\"test_cleanup\"\n \texport test_cleanup test_export_\n-\t/usr/bin/time -f \"%E %U %S\" -o test_time.$i \"$SHELL\" -c '\n+\t\"$GTIME\" -f \"%E %U %S\" -o test_time.$i \"$SHELL\" -c '\n . '\"$TEST_DIRECTORY\"/test-lib-functions.sh'\n test_export () {\n \t[ $# != 0 ] || return 0\n-- \n2.9.0.118.g0e1a633\n\nbase-commit: ab7797dbe95fff38d9265869ea367020046db118\n"},{"id":"289787","messageId":"DA5551A9-E3F0-4A59-9B91-206AA74FEAD4@gmail.com","threadId":"42652","inReplyTo":"fa788ff09727fc37d8e799dbf1a92e4bba4152c9.1466517188.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH v2] perf: accommodate for MacOSX","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-06-21T18:03:10Z","receivedAt":"2016-06-21T18:05:00Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 21 Jun 2016, at 15:53, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:\n> \n> As this developer has no access to MacOSX developer setups anymore,\n> Travis becomes the best bet to run performance tests on that OS.\n> \n> However, on MacOSX /usr/bin/time is that good old BSD executable that\n> no Linux user cares about, as demonstrated by the perf-lib.sh's use\n> of GNU-ish extensions. And by the hard-coded path.\n> \n> Let's just work around this issue by using gtime on MacOSX, the\n> Homebrew-provided GNU implementation onto which pretty much every\n> MacOSX power user falls back anyway.\n> \n> To help other developers use Travis to run performance tests on\n> MacOSX, the .travis.yml file now sports a commented-out line that\n> installs GNU time via Homebrew.\n> \n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n> Published-As: https://github.com/dscho/git/releases/tag/perf-macosx-v2\n> .travis.yml        | 2 ++\n> t/perf/perf-lib.sh | 6 +++++-\n> 2 files changed, 7 insertions(+), 1 deletion(-)\n> Interdiff vs v1:\n> \n> diff --git a/.travis.yml b/.travis.yml\n> index 0e569bc..c2b76f9 100644\n> --- a/.travis.yml\n> +++ b/.travis.yml\n> @@ -82,7 +82,9 @@ before_install:\n>        brew tap homebrew/binary --quiet\n>        brew_force_set_latest_binary_hash perforce\n>        brew_force_set_latest_binary_hash perforce-server\n> -      brew install git-lfs perforce-server perforce gettext gnu-time\n> +      # Uncomment this if you want to run perf tests:\n> +      # brew install gnu-time\n> +      brew install git-lfs perforce-server perforce gettext\n>        brew link --force gettext\n>        ;;\n>      esac;\n> \n> \n> diff --git a/.travis.yml b/.travis.yml\n> index c20ec54..c2b76f9 100644\n> --- a/.travis.yml\n> +++ b/.travis.yml\n> @@ -82,6 +82,8 @@ before_install:\n>       brew tap homebrew/binary --quiet\n>       brew_force_set_latest_binary_hash perforce\n>       brew_force_set_latest_binary_hash perforce-server\n> +      # Uncomment this if you want to run perf tests:\n> +      # brew install gnu-time\n>       brew install git-lfs perforce-server perforce gettext\n>       brew link --force gettext\n>       ;;\n> diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh\n> index 18c363e..773f955 100644\n> --- a/t/perf/perf-lib.sh\n> +++ b/t/perf/perf-lib.sh\n> @@ -127,11 +127,15 @@ test_checkout_worktree () {\n> # Performance tests should never fail.  If they do, stop immediately\n> immediate=t\n> \n> +# Perf tests require GNU time\n> +case \"$(uname -s)\" in Darwin) GTIME=\"${GTIME:-gtime}\";; esac\n> +GTIME=\"${GTIME:-/usr/bin/time}\"\n> +\n> test_run_perf_ () {\n> \ttest_cleanup=:\n> \ttest_export_=\"test_cleanup\"\n> \texport test_cleanup test_export_\n> -\t/usr/bin/time -f \"%E %U %S\" -o test_time.$i \"$SHELL\" -c '\n> +\t\"$GTIME\" -f \"%E %U %S\" -o test_time.$i \"$SHELL\" -c '\n> . '\"$TEST_DIRECTORY\"/test-lib-functions.sh'\n> test_export () {\n> \t[ $# != 0 ] || return 0\n> -- \n> 2.9.0.118.g0e1a633\n> \n> base-commit: ab7797dbe95fff38d9265869ea367020046db118\n\nLooks good to me.\n\n- Lars\n\n"},{"id":"289791","messageId":"xmqq37o6qtjm.fsf@gitster.mtv.corp.google.com","threadId":"42652","inReplyTo":"DA5551A9-E3F0-4A59-9B91-206AA74FEAD4@gmail.com","subject":"Re: [PATCH v2] perf: accommodate for MacOSX","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-06-21T18:35:25Z","receivedAt":"2016-06-21T18:39:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Lars Schneider <larsxschneider@gmail.com> writes:\n\n>> On 21 Jun 2016, at 15:53, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:\n>> \n> Looks good to me.\n\nThanks, both, for following thru.\nWill apply.\n\n"}]}