add drop fs caches to tools/perfect-cli

This commit is contained in:
Carl Pearson
2019-09-26 11:02:53 -05:00
parent 1b3cf604a8
commit a8d83417e8
3 changed files with 11 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ Result sync() {
return Result::SUCCESS;
}
Result drop_caches(const DropCaches_t mode) {
Result drop_caches(const DropCaches_t mode = DropCaches_t(PAGECACHE | ENTRIES)) {
using detail::write_str;
const std::string path = "/proc/sys/vm/drop_caches";
if (mode & PAGECACHE & ENTRIES) {