(b *testing.B)
| 367 | var ulimits []info.UlimitSpec |
| 368 | |
| 369 | func BenchmarkProcessLimitsFile(b *testing.B) { |
| 370 | content, err := os.ReadFile("testdata/limits") |
| 371 | assert.Nil(b, err) |
| 372 | |
| 373 | b.ResetTimer() |
| 374 | for i := 0; i < b.N; i++ { |
| 375 | ulimits = processLimitsFile(string(content)) |
| 376 | } |
| 377 | |
| 378 | // Ensure the compiler doesn't optimize away the benchmark |
| 379 | _ = ulimits |
| 380 | } |
| 381 | |
| 382 | func TestProcessMaxOpenFileLimitLine(t *testing.T) { |
| 383 | line := " 1073741816 1073741816 files " |
nothing calls this directly
no test coverage detected
searching dependent graphs…