Commit 16a38100 authored by Asato Wakisaka's avatar Asato Wakisaka

NumProcs() just counts files under f, so use f.Readdirnames to avoid `lstat`...

NumProcs() just counts files under f, so use f.Readdirnames to avoid `lstat` syscall inside f.Readdir.
parent fd7db8b4
......@@ -35,7 +35,7 @@ func NumProcs() (uint64, error) {
}
defer f.Close()
list, err := f.Readdir(-1)
list, err := f.Readdirnames(-1)
if err != nil {
return 0, err
}
......
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