diff --git a/protobuf/stats.proto b/protobuf/stats.proto index 0e909d9f0..6aad3c136 100644 --- a/protobuf/stats.proto +++ b/protobuf/stats.proto @@ -10,6 +10,10 @@ message dump_stats_entry { required uint64 pages_written = 7; } +message restore_stats_entry { +} + message stats_entry { optional dump_stats_entry dump = 1; + optional restore_stats_entry restore = 2; } diff --git a/stats.c b/stats.c index 97ab61878..f75488d28 100644 --- a/stats.c +++ b/stats.c @@ -81,6 +81,7 @@ void write_stats(int what) { StatsEntry stats = STATS_ENTRY__INIT; DumpStatsEntry ds_entry = DUMP_STATS_ENTRY__INIT; + RestoreStatsEntry rs_entry = RESTORE_STATS_ENTRY__INIT; char *name; int fd; @@ -98,6 +99,10 @@ void write_stats(int what) ds_entry.pages_written = dstats->counts[CNT_PAGES_WRITTEN]; name = "dump"; + } else if (what == RESTORE_STATS) { + stats.restore = &rs_entry; + + name = "restore"; } else return;