Add metrics for time elapsed in base::File::Flush().
According to a synthetic benchmark quoted in issue 469071, fsync() can take up to 700ms if the system is under heavy I/O load. This CL will bring in real-world data that we may use to prioritize efforts on reducing fsync() use.
BUG=473337
Review URL: https://codereview.chromium.org/1044463002
Cr-Commit-Position: refs/heads/master@{#323722}
diff --git a/base/files/file.h b/base/files/file.h
index 13c8a96..49ffb92 100644
--- a/base/files/file.h
+++ b/base/files/file.h
@@ -354,6 +354,10 @@
};
#endif
+ // TODO(tnagel): Reintegrate into Flush() once histogram isn't needed anymore,
+ // cf. issue 473337.
+ bool DoFlush();
+
void SetPlatformFile(PlatformFile file);
#if defined(OS_WIN)