Commit 729ea690 authored by Pavel Emelyanov's avatar Pavel Emelyanov

stats: Introduce protobuf message for restore stats

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 9bb54501
...@@ -10,6 +10,10 @@ message dump_stats_entry { ...@@ -10,6 +10,10 @@ message dump_stats_entry {
required uint64 pages_written = 7; required uint64 pages_written = 7;
} }
message restore_stats_entry {
}
message stats_entry { message stats_entry {
optional dump_stats_entry dump = 1; optional dump_stats_entry dump = 1;
optional restore_stats_entry restore = 2;
} }
...@@ -81,6 +81,7 @@ void write_stats(int what) ...@@ -81,6 +81,7 @@ void write_stats(int what)
{ {
StatsEntry stats = STATS_ENTRY__INIT; StatsEntry stats = STATS_ENTRY__INIT;
DumpStatsEntry ds_entry = DUMP_STATS_ENTRY__INIT; DumpStatsEntry ds_entry = DUMP_STATS_ENTRY__INIT;
RestoreStatsEntry rs_entry = RESTORE_STATS_ENTRY__INIT;
char *name; char *name;
int fd; int fd;
...@@ -98,6 +99,10 @@ void write_stats(int what) ...@@ -98,6 +99,10 @@ void write_stats(int what)
ds_entry.pages_written = dstats->counts[CNT_PAGES_WRITTEN]; ds_entry.pages_written = dstats->counts[CNT_PAGES_WRITTEN];
name = "dump"; name = "dump";
} else if (what == RESTORE_STATS) {
stats.restore = &rs_entry;
name = "restore";
} else } else
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment