File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -296,3 +296,18 @@ func TestClearReferencedBytesWhenClearRefsMissing(t *testing.T) {
296
296
err := clearReferencedBytes (pids , 0 , 1 )
297
297
assert .Nil (t , err )
298
298
}
299
+
300
+ var ulimits []info.UlimitSpec
301
+
302
+ func BenchmarkProcessLimitsFile (b * testing.B ) {
303
+ content , err := os .ReadFile ("testdata/limits" )
304
+ assert .Nil (b , err )
305
+
306
+ b .ResetTimer ()
307
+ for i := 0 ; i < b .N ; i ++ {
308
+ ulimits = processLimitsFile (string (content ))
309
+ }
310
+
311
+ // Ensure the compiler doesn't optimize away the benchmark
312
+ _ = ulimits
313
+ }
Original file line number Diff line number Diff line change
1
+ Limit Soft Limit Hard Limit Units
2
+ Max cpu time unlimited unlimited seconds
3
+ Max file size unlimited unlimited bytes
4
+ Max data size unlimited unlimited bytes
5
+ Max stack size 8388608 unlimited bytes
6
+ Max core file size unlimited unlimited bytes
7
+ Max resident set unlimited unlimited bytes
8
+ Max processes 119958 119958 processes
9
+ Max open files 1073741816 1073741816 files
10
+ Max locked memory 3932852224 3932852224 bytes
11
+ Max address space unlimited unlimited bytes
12
+ Max file locks unlimited unlimited locks
13
+ Max pending signals 119958 119958 signals
14
+ Max msgqueue size 819200 819200 bytes
15
+ Max nice priority 0 0
16
+ Max realtime priority 0 0
17
+ Max realtime timeout unlimited unlimited us
You can’t perform that action at this time.
0 commit comments