Skip to content

Commit

Permalink
metrics: common: Add function to clean the cache.
Browse files Browse the repository at this point in the history
The function clear the Page Cache only.

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
  • Loading branch information
dborquez committed Apr 9, 2024
1 parent 3a419ba commit cb4380d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/metrics/lib/common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit cb4380d

Please sign in to comment.