OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef BASE_METRICS_PERSISTENT_METRICS_FILE_UTIL_H_ | |
bcwhite
2016/09/14 13:16:12
Don't we have some policy against "*_util" files?
scottmg
2016/09/14 20:37:01
Done, much better! It'll be slightly more to stub
| |
6 #define BASE_METRICS_PERSISTENT_METRICS_FILE_UTIL_H_ | |
7 | |
8 #include "base/base_export.h" | |
9 | |
10 namespace base { | |
11 | |
12 class FilePath; | |
13 | |
14 // Initializes a pair of metrics files in the given directory, using | |
15 // |metrics_name| as the basename of the previous run file, and basename + | |
16 // "-active" for the current run, with the given size. The basename one should | |
17 // be associated with the previous run when registered with the metrics system, | |
18 // and the "-active" with the current run. | |
19 BASE_EXPORT void InitializeGlobalPersistentMetricsStorage( | |
20 const base::FilePath& dir, | |
21 const char* metrics_name, | |
22 size_t size); | |
23 | |
24 // If there is a global metrics file being updated on disk, mark it to be | |
25 // deleted when the process exits. A normal shutdown is almost complete | |
26 // so there is no benefit in keeping a file with no new data to be processed | |
27 // during the next startup sequence. Deleting the file during shutdown adds | |
28 // an extra disk-access or two to shutdown but eliminates the unnecessary | |
29 // processing of the contents during startup only to find nothing. | |
30 BASE_EXPORT void CleanUpGlobalPersistentHistogramStorage(); | |
bcwhite
2016/09/14 13:16:12
There's a WriteToPersistentLocation() in that clas
scottmg
2016/09/14 20:37:01
Done.
| |
31 | |
32 } // namespace base | |
33 | |
34 #endif // BASE_METRICS_PERSISTENT_METRICS_FILE_UTIL_H_ | |
OLD | NEW |