MCPcopy Index your code
hub / github.com/coder/coder / expectedNiceScore

Function expectedNiceScore

agent/agentexec/cli_linux_test.go:216–229  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

214}
215
216func expectedNiceScore(t *testing.T) int {
217 t.Helper()
218
219 score, err := unix.Getpriority(unix.PRIO_PROCESS, os.Getpid())
220 require.NoError(t, err)
221
222 // Priority is niceness + 20.
223 score = 20 - score
224 score += 5
225 if score > 19 {
226 return 19
227 }
228 return score
229}
230
231func execArgs(oom int, nice int) []string {
232 execArgs := []string{"agent-exec"}

Callers 1

TestCLIFunction · 0.85

Calls 1

HelperMethod · 0.65

Tested by

no test coverage detected