]> git.ipfire.org Git - thirdparty/git.git/blobdiff - progress.c
The sixth batch
[thirdparty/git.git] / progress.c
index 75633e9c5e91a959e624ea38898933ea20d1daaa..3eda914518bfdcd211552d41b5439125b1ea27ed 100644 (file)
@@ -265,6 +265,7 @@ static struct progress *start_progress_delay(const char *title, uint64_t total,
        progress->title_len = utf8_strwidth(title);
        progress->split = 0;
        set_progress_signal();
+       trace2_region_enter("progress", title, the_repository);
        return progress;
 }
 
@@ -320,6 +321,18 @@ void stop_progress(struct progress **p_progress)
 {
        finish_if_sparse(*p_progress);
 
+       if (p_progress && *p_progress) {
+               trace2_data_intmax("progress", the_repository, "total_objects",
+                                  (*p_progress)->total);
+
+               if ((*p_progress)->throughput)
+                       trace2_data_intmax("progress", the_repository,
+                                          "total_bytes",
+                                          (*p_progress)->throughput->curr_total);
+
+               trace2_region_leave("progress", (*p_progress)->title, the_repository);
+       }
+
        stop_progress_msg(p_progress, _("done"));
 }