metrics: common: Add function to clean the cache.

The function clear the Page Cache only.

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
This commit is contained in:
David Esparza
2024-04-02 12:06:31 -06:00
parent 3a419ba3b1
commit cb4380d1c9

View File

@@ -464,3 +464,8 @@ set_kata_configuration_performance() {
sed -i "s/default_vcpus =[^=&]*/default_vcpus = $NUM_CPUS/g" "${WORKLOAD_CONFIG_FILE}"
popd > /dev/null
}
function clean_cache() {
sudo sync; echo 1 > /proc/sys/vm/drop_caches
}