Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
51c0d8dc
Commit
51c0d8dc
authored
Apr 29, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bulkstat: preheat caches to simplify measurements.
parent
62cc4b45
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
15 deletions
+10
-15
example/benchmark.sh
example/benchmark.sh
+0
-12
example/bulkstat/bulkstat.go
example/bulkstat/bulkstat.go
+10
-3
No files found.
example/benchmark.sh
View file @
51c0d8dc
...
@@ -39,12 +39,6 @@ ${ZIPFS} ${MP} ${ZIPFILE} >& zipfs.log &
...
@@ -39,12 +39,6 @@ ${ZIPFS} ${MP} ${ZIPFILE} >& zipfs.log &
# Wait for zipfs to unpack and serve the file.
# Wait for zipfs to unpack and serve the file.
sleep
${
DELAY
}
sleep
${
DELAY
}
# Warm caches.
${
BULKSTAT
}
-runs
1 /tmp/zipfiles.txt
# Wait for dentry cache to expire.
sleep
2
# Performance number without 6prof running
# Performance number without 6prof running
echo
-e
"
\n\n
"
echo
-e
"
\n\n
"
${
BULKSTAT
}
-runs
5 /tmp/zipfiles.txt
${
BULKSTAT
}
-runs
5 /tmp/zipfiles.txt
...
@@ -66,12 +60,6 @@ ${ZIPFS} -latencies ${MP} ${ZIPFILE} >& zipfs.log &
...
@@ -66,12 +60,6 @@ ${ZIPFS} -latencies ${MP} ${ZIPFILE} >& zipfs.log &
sleep
${
DELAY
}
sleep
${
DELAY
}
# Warm caches.
${
BULKSTAT
}
-runs
1 /tmp/zipfiles.txt
# Expire dentry cache.
sleep
2
# Measurements.
# Measurements.
${
BULKSTAT
}
-runs
5 /tmp/zipfiles.txt
${
BULKSTAT
}
-runs
5 /tmp/zipfiles.txt
...
...
example/bulkstat/bulkstat.go
View file @
51c0d8dc
...
@@ -37,9 +37,16 @@ func main() {
...
@@ -37,9 +37,16 @@ func main() {
}
}
tot
:=
0.0
tot
:=
0.0
for
j
:=
*
runs
;
j
>
0
;
j
--
{
totalRuns
:=
*
runs
+
1
tot
+=
BulkStat
(
*
threads
,
files
)
if
j
>
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
)
fmt
.
Printf
(
"Sleeping %.2f seconds
\n
"
,
*
sleepTime
)
time
.
Sleep
(
int64
(
*
sleepTime
*
1e9
))
time
.
Sleep
(
int64
(
*
sleepTime
*
1e9
))
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment