Skip to content

Commit 03f31a3

Browse files
Merge pull request #108 from jeffhostetler/gvfs-trace2-v4
Trace2 Part 4: add additional trace regions/data to status
2 parents 534dbe1 + d9cbade commit 03f31a3

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

wt-status-serialize.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ void wt_status_serialize_v1(int fd, struct wt_status *s)
297297
struct string_list_item *iter;
298298
int k;
299299

300+
trace2_region_enter("status", "serialize", the_repository);
301+
300302
/*
301303
* version header must be first line.
302304
*/
@@ -330,4 +332,6 @@ void wt_status_serialize_v1(int fd, struct wt_status *s)
330332
}
331333
packet_flush(fd);
332334
}
335+
336+
trace2_region_leave("status", "serialize", the_repository);
333337
}

wt-status.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,6 +2317,12 @@ static void wt_porcelain_v2_print(struct wt_status *s)
23172317

23182318
void wt_status_print(struct wt_status *s)
23192319
{
2320+
trace2_data_intmax("status", the_repository, "count/changed", s->change.nr);
2321+
trace2_data_intmax("status", the_repository, "count/untracked", s->untracked.nr);
2322+
trace2_data_intmax("status", the_repository, "count/ignored", s->ignored.nr);
2323+
2324+
trace2_region_enter("status", "print", the_repository);
2325+
23202326
switch (s->status_format) {
23212327
case STATUS_FORMAT_SHORT:
23222328
wt_shortstatus_print(s);
@@ -2338,6 +2344,8 @@ void wt_status_print(struct wt_status *s)
23382344
wt_status_serialize_v1(1, s);
23392345
break;
23402346
}
2347+
2348+
trace2_region_leave("status", "print", the_repository);
23412349
}
23422350

23432351
/**

0 commit comments

Comments
 (0)