From 0097f690509fcca9c115476feb66bdae294fa494 Mon Sep 17 00:00:00 2001 From: xiejing Date: Thu, 18 Jul 2024 10:06:48 +0800 Subject: [PATCH] add value check for __check_offcpu_duration --- category/get_perf_info.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/category/get_perf_info.py b/category/get_perf_info.py index 8b3adc6..40b18f2 100644 --- a/category/get_perf_info.py +++ b/category/get_perf_info.py @@ -242,6 +242,12 @@ class OffCPU(): if ival <= 0: Logger().error("Application.OffCPU.duration must be positive and nonzero") return False + if ival > 60: + Logger().error("Application.OffCPU.duration not allowed to exceed 60") + return False + if ival < 5: + Logger().error("Application.OffCPU.duration not allowed below 5") + return False return True # perf collect subfunction1: perf record command execute -- Gitee