git/Documentation
Karsten Blees 578da0391a git: add performance tracing for git's main() function to debug scripts
Use trace_performance to measure and print execution time and command line
arguments of the entire main() function. In constrast to the shell's 'time'
utility, which measures total time of the parent process, this logs all
involved git commands recursively. This is particularly useful to debug
performance issues of scripted commands (i.e. which git commands were
called with which parameters, and how long did they execute).

Due to git's deliberate use of exit(), the implementation uses an atexit
routine rather than just adding trace_performance_since() at the end of
main().

Usage example: > GIT_TRACE_PERFORMANCE=~/git-trace.log git stash list

Creates a log file like this:
23:57:38.638765 trace.c:405 performance: 0.000310107 s: git command: 'git' 'rev-parse' '--git-dir'
23:57:38.644387 trace.c:405 performance: 0.000261759 s: git command: 'git' 'rev-parse' '--show-toplevel'
23:57:38.646207 trace.c:405 performance: 0.000304468 s: git command: 'git' 'config' '--get-colorbool' 'color.interactive'
23:57:38.648491 trace.c:405 performance: 0.000241667 s: git command: 'git' 'config' '--get-color' 'color.interactive.help' 'red bold'
23:57:38.650465 trace.c:405 performance: 0.000243063 s: git command: 'git' 'config' '--get-color' '' 'reset'
23:57:38.654850 trace.c:405 performance: 0.025126313 s: git command: 'git' 'stash' 'list'

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-13 21:25:21 -07:00
..
RelNotes Third batch for 2.1 2014-06-16 12:39:35 -07:00
howto Merge branch 'ss/howto-manage-trunk' 2014-06-06 11:39:12 -07:00
technical Merge branch 'ta/string-list-init' 2014-06-16 12:18:55 -07:00
.gitattributes
.gitignore
CodingGuidelines CodingGuidelines: avoid "test <cond> -a/-o <cond>" 2014-05-20 11:19:43 -07:00
Makefile How to keep a project's canonical history correct. 2014-05-28 13:35:43 -07:00
SubmittingPatches Merge branch 'rs/doc-submitting-patches' into maint 2013-12-17 11:38:23 -08:00
asciidoc.conf
blame-options.txt
build-docdep.perl
cat-texi.perl
cmd-list.perl
config.txt Merge branch 'sh/enable-preloadindex' 2014-06-16 12:18:49 -07:00
date-formats.txt Correct word usage of "timezone" in "Documentation" directory 2013-11-12 10:47:17 -08:00
diff-config.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
diff-format.txt
diff-generate-patch.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
diff-options.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
docbook-xsl.css
docbook.xsl
everyday.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
fetch-options.txt Merge branch 'nd/shallow-clone' 2014-01-17 12:21:20 -08:00
fix-texi.perl
git-add.txt Merge branch 'jl/nor-or-nand-and' 2014-04-08 12:00:28 -07:00
git-am.txt Merge branch 'cp/am-patch-format-doc' 2014-03-25 11:01:31 -07:00
git-annotate.txt
git-apply.txt
git-archimport.txt
git-archive.txt docs: clarify remote restrictions for git-upload-archive 2014-02-28 09:55:35 -08:00
git-bisect-lk2009.txt
git-bisect.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-blame.txt docs/git-blame: explain more clearly the example pickaxe use 2014-02-11 11:03:07 -08:00
git-branch.txt
git-bundle.txt
git-cat-file.txt cat-file: provide %(deltabase) batch format 2013-12-26 11:54:26 -08:00
git-check-attr.txt
git-check-ignore.txt
git-check-mailmap.txt
git-check-ref-format.txt
git-checkout-index.txt
git-checkout.txt Documentation: @{-N} can refer to a commit 2014-01-21 13:50:00 -08:00
git-cherry-pick.txt parse-options: multi-word argh should use dash to separate words 2014-03-24 10:43:34 -07:00
git-cherry.txt Documentation: revamp git-cherry(1) 2013-11-27 12:16:49 -08:00
git-citool.txt
git-clean.txt
git-clone.txt docs/git-clone: clarify use of --no-hardlinks option 2014-02-11 11:03:07 -08:00
git-column.txt doc: remote author/documentation sections from more pages 2014-01-27 08:34:34 -08:00
git-commit-tree.txt commit-tree: add and document --no-gpg-sign 2014-02-24 14:51:35 -08:00
git-commit.txt Merge branch 'jc/rev-parse-argh-dashed-multi-words' 2014-04-08 11:59:27 -07:00
git-config.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-count-objects.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
git-credential-cache--daemon.txt
git-credential-cache.txt
git-credential-store.txt
git-credential.txt
git-cvsexportcommit.txt
git-cvsimport.txt Documentation: fix documentation AsciiDoc links for external urls 2014-02-20 14:14:58 -08:00
git-cvsserver.txt
git-daemon.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-describe.txt
git-diff-files.txt
git-diff-index.txt
git-diff-tree.txt
git-diff.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
git-difftool.txt
git-fast-export.txt fast-export: add new --refspec option 2014-04-21 11:47:33 -07:00
git-fast-import.txt Merge branch 'fc/remote-helper-refmap' 2014-06-16 12:18:15 -07:00
git-fetch-pack.txt Merge branch 'tb/doc-fetch-pack-url' into maint 2013-12-17 11:34:24 -08:00
git-fetch.txt Merge branch 'fc/trivial' 2013-12-17 11:46:32 -08:00
git-filter-branch.txt Documentation: fix documentation AsciiDoc links for external urls 2014-02-20 14:14:58 -08:00
git-fmt-merge-msg.txt
git-for-each-ref.txt doc: remote author/documentation sections from more pages 2014-01-27 08:34:34 -08:00
git-format-patch.txt format-patch: add "--signature-file=<file>" option 2014-05-27 12:38:32 -07:00
git-fsck-objects.txt
git-fsck.txt
git-gc.txt gc --aggressive: make --depth configurable 2014-03-31 10:26:24 -07:00
git-get-tar-commit-id.txt
git-grep.txt grep: add grep.fullName config variable 2014-03-20 12:38:00 -07:00
git-gui.txt
git-hash-object.txt
git-help.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-http-backend.txt Merge commit 'doc/http-backend: missing accent grave in literal mark-up' 2014-04-09 11:45:04 -07:00
git-http-fetch.txt
git-http-push.txt
git-imap-send.txt
git-index-pack.txt
git-init-db.txt
git-init.txt
git-instaweb.txt
git-log.txt Merge branch 'jj/log-doc' into maint 2013-12-17 11:35:41 -08:00
git-ls-files.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-ls-remote.txt
git-ls-tree.txt
git-mailinfo.txt
git-mailsplit.txt
git-merge-base.txt
git-merge-file.txt
git-merge-index.txt
git-merge-one-file.txt
git-merge-tree.txt
git-merge.txt merge: enable defaulttoupstream by default 2014-04-22 12:53:59 -07:00
git-mergetool--lib.txt
git-mergetool.txt mergetool: document the default for --[no-]prompt 2014-04-24 11:29:05 -07:00
git-mktag.txt
git-mktree.txt
git-mv.txt mv: better document side effects when moving a submodule 2014-01-07 14:33:04 -08:00
git-name-rev.txt
git-notes.txt parse-options: multi-word argh should use dash to separate words 2014-03-24 10:43:34 -07:00
git-p4.txt git p4 doc: use two-line style for options with multiple spellings 2014-01-22 08:06:20 -08:00
git-pack-objects.txt upload-pack: send shallow info over stdin to pack-objects 2014-03-11 13:32:10 -07:00
git-pack-redundant.txt
git-pack-refs.txt
git-parse-remote.txt
git-patch-id.txt patch-id: make it stable against hunk reordering 2014-06-10 13:09:24 -07:00
git-prune-packed.txt
git-prune.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
git-pull.txt Merge branch 'jc/maint-pull-docfix' into maint 2014-02-05 14:03:47 -08:00
git-push.txt Merge branch 'jl/nor-or-nand-and' 2014-04-08 12:00:28 -07:00
git-quiltimport.txt
git-read-tree.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-rebase.txt rebase: add the --gpg-sign option 2014-02-11 14:48:20 -08:00
git-receive-pack.txt
git-reflog.txt
git-relink.txt
git-remote-ext.txt doc: remote author/documentation sections from more pages 2014-01-27 08:34:34 -08:00
git-remote-fd.txt doc: remote author/documentation sections from more pages 2014-01-27 08:34:34 -08:00
git-remote-helpers.txto
git-remote-testgit.txt
git-remote.txt docs/git-remote: capitalize first word of initial blurb 2014-02-11 11:03:07 -08:00
git-repack.txt Merge branch 'jk/repack-pack-keep-objects' 2014-03-18 13:50:29 -07:00
git-replace.txt Documentation: replace: describe new --edit option 2014-05-19 13:39:54 -07:00
git-request-pull.txt request-pull: documentation updates 2014-03-13 14:22:20 -07:00
git-rerere.txt
git-reset.txt Merge branch 'jl/nor-or-nand-and' 2014-04-08 12:00:28 -07:00
git-rev-list.txt rev-list: add bitmap mode to speed up object lists 2013-12-30 12:19:22 -08:00
git-rev-parse.txt Merge branch 'ib/rev-parse-parseopt-argh' 2014-04-08 12:00:09 -07:00
git-revert.txt parse-options: multi-word argh should use dash to separate words 2014-03-24 10:43:34 -07:00
git-rm.txt rm: better document side effects when removing a submodule 2014-01-07 14:34:06 -08:00
git-send-email.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-send-pack.txt
git-sh-i18n--envsubst.txt
git-sh-i18n.txt
git-sh-setup.txt
git-shell.txt shell doc: remove stray "+" in example 2014-05-08 10:26:26 -07:00
git-shortlog.txt
git-show-branch.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
git-show-index.txt
git-show-ref.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
git-show.txt
git-stage.txt
git-stash.txt stash doc: mention short form -k in save description 2014-02-24 09:13:30 -08:00
git-status.txt Merge branch 'dw/doc-status-no-longer-shows-pound-prefix' 2014-03-31 16:30:52 -07:00
git-stripspace.txt
git-submodule.txt Revert "submodule: explicit local branch creation in module_clone" 2014-04-02 14:15:36 -07:00
git-svn.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-symbolic-ref.txt
git-tag.txt tag: support --sort=<spec> 2014-02-27 14:04:05 -08:00
git-tools.txt
git-unpack-file.txt
git-unpack-objects.txt Merge branch 'vd/doc-unpack-objects' into maint 2013-11-07 14:37:36 -08:00
git-update-index.txt update-index: teach --cacheinfo a new syntax "mode,sha1,path" 2014-03-24 10:43:35 -07:00
git-update-ref.txt update-ref --stdin -z: deprecate interpreting the empty string as zeros 2014-04-07 12:09:13 -07:00
git-update-server-info.txt
git-upload-archive.txt add uploadarchive.allowUnreachable option 2014-02-28 09:55:37 -08:00
git-upload-pack.txt
git-var.txt
git-verify-pack.txt
git-verify-tag.txt
git-web--browse.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
git-whatchanged.txt
git-write-tree.txt
git.txt git: add performance tracing for git's main() function to debug scripts 2014-07-13 21:25:21 -07:00
gitattributes.txt gitattributes: document more clearly where macros are allowed 2014-01-14 13:56:56 -08:00
gitcli.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
gitcore-tutorial.txt Documentation: fix documentation AsciiDoc links for external urls 2014-02-20 14:14:58 -08:00
gitcredentials.txt
gitcvs-migration.txt Documentation: fix documentation AsciiDoc links for external urls 2014-02-20 14:14:58 -08:00
gitdiffcore.txt
gitglossary.txt
githooks.txt Documentation: fix typos in man pages 2014-02-05 14:35:45 -08:00
gitignore.txt Merge branch 'nd/gitignore-trailing-whitespace' 2014-03-14 14:23:37 -07:00
gitk.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
gitmodules.txt status/commit: show staged submodules regardless of ignore config 2014-04-07 10:32:20 -07:00
gitnamespaces.txt
gitremote-helpers.txt Merge branch 'fc/transport-helper-fixes' 2014-03-18 13:49:33 -07:00
gitrepository-layout.txt docs: mark info/grafts as outdated 2014-03-05 12:24:01 -08:00
gitrevisions.txt
gittutorial-2.txt
gittutorial.txt
gitweb.conf.txt Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues 2014-05-21 13:57:10 -07:00
gitweb.txt Documentation: fix documentation AsciiDoc links for external urls 2014-02-20 14:14:58 -08:00
gitworkflows.txt
glossary-content.txt Documentation: wording fixes in the user manual and glossary 2014-05-28 10:40:06 -07:00
howto-index.sh howto-index.sh: use the $( ... ) construct for command substitution 2014-04-17 11:14:57 -07:00
i18n.txt
install-doc-quick.sh
install-webdoc.sh install-webdoc.sh: use the $( ... ) construct for command substitution 2014-04-17 11:14:58 -07:00
line-range-format.txt
mailmap.txt
manpage-1.72.xsl
manpage-base-url.xsl.in
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-quote-apos.xsl
manpage-suppress-sp.xsl
merge-config.txt
merge-options.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
merge-strategies.txt Merge branch 'rr/doc-merge-strategies' into maint 2014-04-03 13:39:03 -07:00
pretty-formats.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
pretty-options.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
pull-fetch-param.txt
rev-list-options.txt Merge branch 'jl/nor-or-nand-and' 2014-04-08 12:00:28 -07:00
revisions.txt Documentation: mention config sources for @{upstream} 2014-05-13 12:35:00 -07:00
sequencer.txt
urls-remotes.txt
urls.txt
user-manual.conf
user-manual.txt Merge branch 'jm/doc-wording-tweaks' 2014-06-16 12:18:39 -07:00