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
Kirill Smelkov
go-fuse
Commits
8e70889f
Commit
8e70889f
authored
Jun 08, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gofmt.
parent
a4af95ae
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
11 deletions
+10
-11
benchmark/stat_test.go
benchmark/stat_test.go
+5
-5
fuse/fsops.go
fuse/fsops.go
+0
-1
fuse/latencymap.go
fuse/latencymap.go
+1
-1
fuse/mountstate.go
fuse/mountstate.go
+1
-1
fuse/pressure_test.go
fuse/pressure_test.go
+2
-2
splice/pool.go
splice/pool.go
+1
-1
No files found.
benchmark/stat_test.go
View file @
8e70889f
...
@@ -36,9 +36,9 @@ func setupFs(fs fuse.FileSystem) (string, func()) {
...
@@ -36,9 +36,9 @@ func setupFs(fs fuse.FileSystem) (string, func()) {
lc
,
lns
:=
state
.
Latencies
()
.
Get
(
"LOOKUP"
)
lc
,
lns
:=
state
.
Latencies
()
.
Get
(
"LOOKUP"
)
gc
,
gns
:=
state
.
Latencies
()
.
Get
(
"GETATTR"
)
gc
,
gns
:=
state
.
Latencies
()
.
Get
(
"GETATTR"
)
fmt
.
Printf
(
"GETATTR %dus/call n=%d, LOOKUP %dus/call n=%d
\n
"
,
fmt
.
Printf
(
"GETATTR %dus/call n=%d, LOOKUP %dus/call n=%d
\n
"
,
gns
/
int64
(
1000
*
lc
),
gc
,
gns
/
int64
(
1000
*
lc
),
gc
,
lns
/
int64
(
1000
*
lc
),
lc
)
lns
/
int64
(
1000
*
lc
),
lc
)
err
:=
state
.
Unmount
()
err
:=
state
.
Unmount
()
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Println
(
"error during unmount"
,
err
)
log
.
Println
(
"error during unmount"
,
err
)
...
@@ -115,7 +115,7 @@ func TestingBOnePass(b *testing.B, threads int, files []string) (results []float
...
@@ -115,7 +115,7 @@ func TestingBOnePass(b *testing.B, threads int, files []string) (results []float
runtime
.
GC
()
runtime
.
GC
()
var
before
,
after
runtime
.
MemStats
var
before
,
after
runtime
.
MemStats
runtime
.
ReadMemStats
(
&
before
)
runtime
.
ReadMemStats
(
&
before
)
todo
:=
b
.
N
todo
:=
b
.
N
for
todo
>
0
{
for
todo
>
0
{
if
len
(
files
)
>
todo
{
if
len
(
files
)
>
todo
{
...
@@ -128,7 +128,7 @@ func TestingBOnePass(b *testing.B, threads int, files []string) (results []float
...
@@ -128,7 +128,7 @@ func TestingBOnePass(b *testing.B, threads int, files []string) (results []float
results
=
append
(
results
,
result
)
results
=
append
(
results
,
result
)
}
}
runtime
.
ReadMemStats
(
&
after
)
runtime
.
ReadMemStats
(
&
after
)
fmt
.
Printf
(
"GC count %d, total GC time: %d ns/file
\n
"
,
fmt
.
Printf
(
"GC count %d, total GC time: %d ns/file
\n
"
,
after
.
NumGC
-
before
.
NumGC
,
(
after
.
PauseTotalNs
-
before
.
PauseTotalNs
)
/
uint64
(
b
.
N
))
after
.
NumGC
-
before
.
NumGC
,
(
after
.
PauseTotalNs
-
before
.
PauseTotalNs
)
/
uint64
(
b
.
N
))
return
results
return
results
...
...
fuse/fsops.go
View file @
8e70889f
...
@@ -15,7 +15,6 @@ import (
...
@@ -15,7 +15,6 @@ import (
var
_
=
log
.
Println
var
_
=
log
.
Println
func
(
c
*
FileSystemConnector
)
String
()
string
{
func
(
c
*
FileSystemConnector
)
String
()
string
{
if
c
.
rootNode
==
nil
||
c
.
rootNode
.
mount
==
nil
{
if
c
.
rootNode
==
nil
||
c
.
rootNode
.
mount
==
nil
{
return
"go-fuse:unmounted"
return
"go-fuse:unmounted"
...
...
fuse/latencymap.go
View file @
8e70889f
...
@@ -11,7 +11,7 @@ type latencyMapEntry struct {
...
@@ -11,7 +11,7 @@ type latencyMapEntry struct {
type
LatencyMap
struct
{
type
LatencyMap
struct
{
sync
.
Mutex
sync
.
Mutex
stats
map
[
string
]
*
latencyMapEntry
stats
map
[
string
]
*
latencyMapEntry
}
}
func
NewLatencyMap
()
*
LatencyMap
{
func
NewLatencyMap
()
*
LatencyMap
{
...
...
fuse/mountstate.go
View file @
8e70889f
...
@@ -94,7 +94,7 @@ func (ms *MountState) Mount(mountPoint string, opts *MountOptions) error {
...
@@ -94,7 +94,7 @@ func (ms *MountState) Mount(mountPoint string, opts *MountOptions) error {
}
}
name
=
strings
.
Replace
(
name
[
:
l
],
","
,
";"
,
-
1
)
name
=
strings
.
Replace
(
name
[
:
l
],
","
,
";"
,
-
1
)
}
}
optStrs
=
append
(
optStrs
,
"subtype="
+
name
)
optStrs
=
append
(
optStrs
,
"subtype="
+
name
)
file
,
mp
,
err
:=
mount
(
mountPoint
,
strings
.
Join
(
optStrs
,
","
))
file
,
mp
,
err
:=
mount
(
mountPoint
,
strings
.
Join
(
optStrs
,
","
))
if
err
!=
nil
{
if
err
!=
nil
{
...
...
fuse/pressure_test.go
View file @
8e70889f
...
@@ -20,7 +20,7 @@ var _ = log.Println
...
@@ -20,7 +20,7 @@ var _ = log.Println
type
DelayFs
struct
{
type
DelayFs
struct
{
DefaultFileSystem
DefaultFileSystem
fileRegex
*
regexp
.
Regexp
fileRegex
*
regexp
.
Regexp
dirRegex
*
regexp
.
Regexp
dirRegex
*
regexp
.
Regexp
}
}
...
@@ -38,7 +38,7 @@ func (d *DelayFs) GetAttr(name string, c *Context) (*Attr, Status) {
...
@@ -38,7 +38,7 @@ func (d *DelayFs) GetAttr(name string, c *Context) (*Attr, Status) {
func
TestMemoryPressure
(
t
*
testing
.
T
)
{
func
TestMemoryPressure
(
t
*
testing
.
T
)
{
fs
:=
&
DelayFs
{
fs
:=
&
DelayFs
{
fileRegex
:
regexp
.
MustCompile
(
"^dir[0-9]*/file[0-9]*$"
),
fileRegex
:
regexp
.
MustCompile
(
"^dir[0-9]*/file[0-9]*$"
),
dirRegex
:
regexp
.
MustCompile
(
"^dir[0-9]*$"
),
dirRegex
:
regexp
.
MustCompile
(
"^dir[0-9]*$"
),
}
}
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
...
...
splice/pool.go
View file @
8e70889f
...
@@ -62,7 +62,7 @@ func (me *pairPool) used() (n int) {
...
@@ -62,7 +62,7 @@ func (me *pairPool) used() (n int) {
func
(
me
*
pairPool
)
total
()
int
{
func
(
me
*
pairPool
)
total
()
int
{
me
.
Lock
()
me
.
Lock
()
n
:=
me
.
usedCount
+
len
(
me
.
unused
)
n
:=
me
.
usedCount
+
len
(
me
.
unused
)
me
.
Unlock
()
me
.
Unlock
()
return
n
return
n
}
}
...
...
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