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
b68c22d2
Commit
b68c22d2
authored
Mar 23, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Blanks. Remove old loopback.go.
parent
39a8546d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
82 deletions
+0
-82
example/benchmark.sh
example/benchmark.sh
+0
-2
example/loopback.go
example/loopback.go
+0
-80
No files found.
example/benchmark.sh
View file @
b68c22d2
...
...
@@ -36,8 +36,6 @@ ${BULKSTAT} /tmp/zipfiles.txt
# C++ binaries can do this ~0.1ms/stat.
${
BULKSTAT
}
/tmp/zipfiles.txt
fusermount
-u
/tmp/zipbench
cat
zipfs.log
example/loopback.go
deleted
100644 → 0
View file @
39a8546d
// Mounts another directory as loopback for testing and benchmarking
// purposes.
package
main
import
(
"github.com/hanwen/go-fuse/fuse"
"fmt"
"os"
"flag"
"runtime"
"log"
)
var
_
=
runtime
.
GOMAXPROCS
var
_
=
log
.
Print
func
main
()
{
// Scans the arg list and sets up flags
debug
:=
flag
.
Bool
(
"debug"
,
false
,
"print debugging messages."
)
threaded
:=
flag
.
Bool
(
"threaded"
,
true
,
"switch off threading; print debugging messages."
)
flag
.
Parse
()
if
flag
.
NArg
()
<
2
{
// TODO - where to get program name?
fmt
.
Println
(
"usage: main ORIGINAL MOUNTPOINT"
)
os
.
Exit
(
2
)
}
orig
:=
flag
.
Arg
(
0
)
fs
:=
fuse
.
NewLoopbackFileSystem
(
orig
)
timing
:=
fuse
.
NewTimingPathFilesystem
(
fs
)
var
opts
fuse
.
PathFileSystemConnectorOptions
fs
.
FillOptions
(
&
opts
)
conn
:=
fuse
.
NewPathFileSystemConnector
(
timing
)
rawTiming
:=
fuse
.
NewTimingRawFilesystem
(
conn
)
conn
.
SetOptions
(
opts
)
state
:=
fuse
.
NewMountState
(
rawTiming
)
state
.
Debug
=
*
debug
mountPoint
:=
flag
.
Arg
(
1
)
err
:=
state
.
Mount
(
mountPoint
)
if
err
!=
nil
{
fmt
.
Printf
(
"MountFuse fail: %v
\n
"
,
err
)
os
.
Exit
(
1
)
}
fmt
.
Printf
(
"Mounted %s on %s (threaded=%v, debug=%v)
\n
"
,
orig
,
mountPoint
,
*
threaded
,
*
debug
)
state
.
Loop
(
*
threaded
)
fmt
.
Println
(
"Finished"
,
state
.
Stats
())
fmt
.
Println
(
"
\n\n
MountState statistics
\n
"
)
counts
:=
state
.
OperationCounts
()
fmt
.
Println
(
"Counts: "
,
counts
)
latency
:=
state
.
Latencies
()
fmt
.
Println
(
"Operation latency (ms):"
)
fuse
.
PrintMap
(
latency
)
latency
=
rawTiming
.
Latencies
()
fmt
.
Println
(
"
\n\n
Raw FS (ms):"
,
latency
)
fmt
.
Println
(
"
\n\n
Loopback FS statistics
\n
"
)
latency
=
timing
.
Latencies
()
fmt
.
Println
(
"Latency (ms):"
,
latency
)
fmt
.
Println
(
"Operation counts:"
,
timing
.
OperationCounts
())
hot
,
unique
:=
timing
.
HotPaths
(
"GetAttr"
)
top
:=
20
start
:=
len
(
hot
)
-
top
if
start
<
0
{
start
=
0
}
fmt
.
Printf
(
"Unique GetAttr paths: %d
\n
"
,
unique
)
fmt
.
Printf
(
"Top %d GetAttr paths: %v"
,
top
,
hot
[
start
:
])
}
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