github.com/kubewharf/katalyst-core@v0.5.3/pkg/agent/qrm-plugins/util/consts.go (about) 1 /* 2 Copyright 2022 The Katalyst Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package util 18 19 const ( 20 // common metrics for all types of qrm plugins 21 MetricNameHeartBeat = "heartbeat" 22 MetricNameAllocateFailed = "alloc_failed" 23 MetricNameGetTopologyHintsFailed = "get_topology_hints_failed" 24 MetricNameRemovePodFailed = "remove_pod_failed" 25 MetricNameLWAdvisorServerFailed = "lw_advisor_server_failed" 26 MetricNameHandleAdvisorRespCalled = "handle_advisor_resp_called" 27 MetricNameHandleAdvisorRespFailed = "handle_advisor_resp_failed" 28 MetricNameLWRecvStuck = "lw_recv_stuck" 29 30 // metrics for cpu plugin 31 MetricNamePoolSize = "pool_size" 32 MetricNameRealStateInvalid = "real_state_invalid" 33 MetricNameCPUSetInvalid = "cpuset_invalid" 34 MetricNameCPUSetOverlap = "cpuset_overlap" 35 36 // metrics for memory plugin 37 MetricNameMemSetInvalid = "memset_invalid" 38 MetricNameMemSetOverlap = "memset_overlap" 39 MetricNameNodeMemsetInvalid = "node_memset_invalid" 40 MetricNameMemoryHandleAdvisorContainerEntryFailed = "memory_handle_advisor_container_entry_failed" 41 MetricNameMemoryHandleAdvisorExtraEntryFailed = "memory_handle_advisor_extra_entry_failed" 42 MetricNameMemoryHandleAdvisorMemoryLimit = "memory_handle_advisor_memory_limit" 43 MetricNameMemoryHandleAdvisorDropCache = "memory_handle_advisor_drop_cache" 44 MetricNameMemoryHandleAdvisorCPUSetMems = "memory_handle_advisor_cpuset_mems" 45 MetricNameMemoryHandlerAdvisorMemoryOffload = "memory_handler_advisor_memory_offloading" 46 MetricNameMemoryOOMPriorityDeleteFailed = "memory_oom_priority_delete_failed" 47 MetricNameMemoryOOMPriorityUpdateFailed = "memory_oom_priority_update_failed" 48 MetricNameMemoryNumaBalance = "memory_handle_numa_balance" 49 MetricNameMemoryNumaBalanceCost = "memory_numa_balance_cost" 50 MetricNameMemoryNumaBalanceResult = "memory_numa_balance_result" 51 ) 52 53 // those are OCI property names to be used by QRM plugins 54 const ( 55 OCIPropertyNameCPUSetCPUs = "CpusetCpus" 56 OCIPropertyNameCPUSetMems = "CpusetMems" 57 OCIPropertyNameMemoryLimitInBytes = "MemoryLimitInBytes" 58 ) 59 60 const QRMTimeFormat = "2006-01-02 15:04:05.999999999 -0700 MST" 61 62 const QRMPluginPolicyTagName = "policy"