Commit 8e70889f authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

gofmt.

parent a4af95ae
......@@ -36,9 +36,9 @@ func setupFs(fs fuse.FileSystem) (string, func()) {
lc, lns := state.Latencies().Get("LOOKUP")
gc, gns := state.Latencies().Get("GETATTR")
fmt.Printf("GETATTR %dus/call n=%d, LOOKUP %dus/call n=%d\n",
gns / int64(1000 * lc), gc,
lns / int64(1000 * lc), lc)
gns/int64(1000*lc), gc,
lns/int64(1000*lc), lc)
err := state.Unmount()
if err != nil {
log.Println("error during unmount", err)
......@@ -115,7 +115,7 @@ func TestingBOnePass(b *testing.B, threads int, files []string) (results []float
runtime.GC()
var before, after runtime.MemStats
runtime.ReadMemStats(&before)
todo := b.N
for todo > 0 {
if len(files) > todo {
......@@ -128,7 +128,7 @@ func TestingBOnePass(b *testing.B, threads int, files []string) (results []float
results = append(results, result)
}
runtime.ReadMemStats(&after)
fmt.Printf("GC count %d, total GC time: %d ns/file\n",
after.NumGC-before.NumGC, (after.PauseTotalNs-before.PauseTotalNs)/uint64(b.N))
return results
......
......@@ -15,7 +15,6 @@ import (
var _ = log.Println
func (c *FileSystemConnector) String() string {
if c.rootNode == nil || c.rootNode.mount == nil {
return "go-fuse:unmounted"
......
......@@ -11,7 +11,7 @@ type latencyMapEntry struct {
type LatencyMap struct {
sync.Mutex
stats map[string]*latencyMapEntry
stats map[string]*latencyMapEntry
}
func NewLatencyMap() *LatencyMap {
......
......@@ -94,7 +94,7 @@ func (ms *MountState) Mount(mountPoint string, opts *MountOptions) error {
}
name = strings.Replace(name[:l], ",", ";", -1)
}
optStrs = append(optStrs, "subtype=" + name)
optStrs = append(optStrs, "subtype="+name)
file, mp, err := mount(mountPoint, strings.Join(optStrs, ","))
if err != nil {
......
......@@ -20,7 +20,7 @@ var _ = log.Println
type DelayFs struct {
DefaultFileSystem
fileRegex *regexp.Regexp
fileRegex *regexp.Regexp
dirRegex *regexp.Regexp
}
......@@ -38,7 +38,7 @@ func (d *DelayFs) GetAttr(name string, c *Context) (*Attr, Status) {
func TestMemoryPressure(t *testing.T) {
fs := &DelayFs{
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")
......
......@@ -62,7 +62,7 @@ func (me *pairPool) used() (n int) {
func (me *pairPool) total() int {
me.Lock()
n := me.usedCount + len(me.unused)
n := me.usedCount + len(me.unused)
me.Unlock()
return n
}
......
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