MCPcopy Create free account
hub / github.com/ByteYellow/AgentProvenance / cpuWeightForProfile

Function cpuWeightForProfile

internal/control/service.go:584–593  ·  view source on GitHub ↗
(profile string)

Source from the content-addressed store, hash-verified

582}
583
584func cpuWeightForProfile(profile string) (int64, string, error) {
585 switch strings.ToLower(strings.TrimSpace(profile)) {
586 case "", CPUProfileThink, "idle":
587 return CPUWeightThink, CPUProfileThink, nil
588 case CPUProfileTool, "active":
589 return CPUWeightTool, CPUProfileTool, nil
590 default:
591 return 0, "", fmt.Errorf("unknown cpu profile %q", profile)
592 }
593}
594
595func (s Service) runtimeName() string {
596 if s.Driver != nil {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected