Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sokunthea.eang committed Oct 29, 2023
1 parent bcdabb3 commit a947f06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/powermanger/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func setCPUFrequency(frequency int) error {
func main() {
// Define your Prometheus query and threshold values
command := "curl -G 'http://127.0.0.1:9090/api/v1/query?' --data-urlencode 'query=(avg by(instance) (rate(node_cpu_seconds_total{mode=\"idle\"}[2m])) * 100)' | jq -r '.data.result[1].value[1]'\n"
thresholdHigh := 80.0 // Mostly idle => decrease frequency
thresholdLow := 20.0 // Mostly CPU bound => increase frequency
//thresholdHigh := 80.0 // Mostly idle => decrease frequency
//thresholdLow := 20.0 // Mostly CPU bound => increase frequency

for {
cmd := exec.Command("bash", "-c", command)
Expand Down

0 comments on commit a947f06

Please sign in to comment.