You are given a list of numbers representing the CPU usage (in percentage) of a server at different time intervals. Your task is to identify the time intervals during which the server experienced high CPU usage, defined as exceeding a certain threshold. Write a Python function to find these high CPU usage intervals and return their start and end times. Example: Input: makefile cpu usage = [10, 20, 80, 90, 30, 25, 75, 95, 40, 15] threshold = 70 Output: less High CPU usage intervals: [(2, 3), (6, 7), (8, 8)] Copy code Copy code

icon
Related questions
Question
You are given a list of numbers representing the CPU usage (in percentage) of a server at different
time intervals. Your task is to identify the time intervals during which the server experienced high
CPU usage, defined as exceeding a certain threshold. Write a Python function to find these high
CPU usage intervals and return their start and end times.
Example:
Input:
makefile
cpu_usage = [10, 20, 80, 90, 30, 25, 75, 95, 40, 15]
threshold = 70
Output:
less
High CPU usage intervals: [(2, 3), (6, 7), (8, 8)]
Copy code
Copy code
Transcribed Image Text:You are given a list of numbers representing the CPU usage (in percentage) of a server at different time intervals. Your task is to identify the time intervals during which the server experienced high CPU usage, defined as exceeding a certain threshold. Write a Python function to find these high CPU usage intervals and return their start and end times. Example: Input: makefile cpu_usage = [10, 20, 80, 90, 30, 25, 75, 95, 40, 15] threshold = 70 Output: less High CPU usage intervals: [(2, 3), (6, 7), (8, 8)] Copy code Copy code
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer