git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [RFC PATCH] pack-objects: write objects packed to trace2
@ 2019-04-09 21:44 Jonathan Tan
  2019-04-10  3:52 ` Junio C Hamano
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jonathan Tan @ 2019-04-09 21:44 UTC (permalink / raw)
  To: git; +Cc: Jonathan Tan

This is useful when investigating performance of pushes, and other times
when no progress information is written (because the pack is written to
stdout).

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
---
We're trying to improve push performance, and it would be nice to be
able to observe the number of objects sent over each push, both to
correlate it with time taken (which is already traced) and to notice
situations when significantly more objects are being sent than needed.

Sending this as an RFC because this patch works but is somewhat ad-hoc -
perhaps someone else has a more comprehensive solution.
---
 builtin/pack-objects.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index a154fc29f6..ac464d7d07 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -964,6 +964,7 @@ static void write_pack_file(void)
 	if (written != nr_result)
 		die(_("wrote %"PRIu32" objects while expecting %"PRIu32),
 		    written, nr_result);
+	trace2_printf("packed %d objects", nr_result);
 }
 
 static int no_try_delta(const char *path)
-- 
2.21.0.392.gf8f6787159e-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-11 17:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09 21:44 [RFC PATCH] pack-objects: write objects packed to trace2 Jonathan Tan
2019-04-10  3:52 ` Junio C Hamano
2019-04-10  5:08 ` Duy Nguyen
2019-04-10 15:05 ` Jeff Hostetler
2019-04-11 17:36 ` [PATCH v2] " Jonathan Tan

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).