Commit 51c0d8dc authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

bulkstat: preheat caches to simplify measurements.

parent 62cc4b45
......@@ -39,12 +39,6 @@ ${ZIPFS} ${MP} ${ZIPFILE} >& zipfs.log &
# Wait for zipfs to unpack and serve the file.
sleep ${DELAY}
# Warm caches.
${BULKSTAT} -runs 1 /tmp/zipfiles.txt
# Wait for dentry cache to expire.
sleep 2
# Performance number without 6prof running
echo -e "\n\n"
${BULKSTAT} -runs 5 /tmp/zipfiles.txt
......@@ -66,12 +60,6 @@ ${ZIPFS} -latencies ${MP} ${ZIPFILE} >& zipfs.log &
sleep ${DELAY}
# Warm caches.
${BULKSTAT} -runs 1 /tmp/zipfiles.txt
# Expire dentry cache.
sleep 2
# Measurements.
${BULKSTAT} -runs 5 /tmp/zipfiles.txt
......
......@@ -37,9 +37,16 @@ func main() {
}
tot := 0.0
for j := *runs; j > 0; j-- {
tot += BulkStat(*threads, files)
if j > 1 {
totalRuns := *runs + 1
for j := 0 ; j < totalRuns; j++ {
result := BulkStat(*threads, files)
if j > 0 {
tot += result
} else {
fmt.Println("Ignoring first run to preheat caches.")
}
if j < totalRuns-1 {
fmt.Printf("Sleeping %.2f seconds\n", *sleepTime)
time.Sleep(int64(*sleepTime * 1e9))
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment