Skip to content
callcount

package

os

standard library

75 standard-library functions from os, ranked by how often they are called outside tests and generated code.

Docs on pkg.go.dev ↗

prod calls
122,603
non-test, non-generated
all calls
257,302
total callsites
functions
75
ranked in this snapshot
origin
std
standard-library

members

Functions in os

Ranked by production calls. The bar scales each function against the busiest in this package.

Function Prod calls
Getenv 15,532
File.Close 12,586
Stat 10,186
Exit 8,280
ReadFile 8,089
IsNotExist 7,044
Open 5,361
MkdirAll 5,117
Remove 4,875
WriteFile 4,198
File.Name 3,239
RemoveAll 3,099
Create 2,674
OpenFile 2,612
ReadDir 1,977
File.Fd 1,612
File.Write 1,569
Environ 1,532
LookupEnv 1,486
Rename 1,270
Getwd 1,126
File.WriteString 1,112
Lstat 1,046
Setenv 1,012
MkdirTemp 996
CreateTemp 961
File.Stat 882
Getpid 710
File.Seek 703
UserHomeDir 691
Chmod 687
File.Sync 644
TempDir 588
Hostname 530
Mkdir 519
Process.Kill 449
Readlink 434
Process.Signal 429
Executable 406
IsExist 375
File.Read 353
ProcessState.ExitCode 346
Symlink 323
NewFile 316
Getuid 298
Chdir 286
Pipe 239
FindProcess 218
Unsetenv 211
File.Truncate 200
ExpandEnv 189
IsPermission 189
File.Readdirnames 187
DirFS 186
Chown 186
Geteuid 180
Chtimes 172
File.ReadAt 156
NewSyscallError 153
SameFile 140
File.Chmod 140
ProcessState.Sys 127
Root.Close 122
OpenRoot 111
File.WriteAt 98
Getpagesize 97
UserCacheDir 95
IsPathSeparator 94
Process.Wait 93
File.Readdir 86
Link 83
UserConfigDir 80
Getgid 72
Expand 71
Signal.String 68