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
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
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images