Skip to content

Commit

Permalink
change cpu_time unit (us to ms)
Browse files Browse the repository at this point in the history
Signed-off-by: Sunyanan Choochotkaew <[email protected]>
  • Loading branch information
sunya-ch committed Feb 2, 2024
1 parent dc4d631 commit 0278c38
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmd/cmd_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def summary_validation(validate_df):
# CPU instruction is mainly used for ratio.
# reference: https://github.com/sustainable-computing-io/kepler/blob/0b328cf7c79db9a11426fb80a1a922383e40197c/pkg/config/config.go#L92
"hwc": "kepler_container_cpu_instructions_total",
"bpf": "kepler_container_bpf_cpu_time_us_total",
"bpf": "kepler_container_bpf_cpu_time_ms_total",
}
metric_to_validate_power = {
"intel_rapl": "kepler_node_package_joules_total",
Expand Down
2 changes: 1 addition & 1 deletion manifests/kepler/patch/patch-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ spec:
containers:
- name: kepler-exporter
imagePullPolicy: IfNotPresent
image: quay.io/sustainable_computing_io/kepler:latest-libbpf
image: quay.io/sustainable_computing_io/kepler:latest
2 changes: 1 addition & 1 deletion model_training/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e
# Supported CLUSTER_PROVIDER are kind,microshift
export CLUSTER_PROVIDER=${CLUSTER_PROVIDER:-kind}
export IMAGE_TAG=${IMAGE_TAG:-latest-libbpf}
export IMAGE_TAG=${IMAGE_TAG:-latest}
export KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME:-kind-for-training}
export KIND_REGISTRY_NAME=${KIND_REGISTRY_NAME:-kind-registry-for-training}
export REGISTRY_PORT=${REGISTRY_PORT:-5101}
Expand Down
2 changes: 1 addition & 1 deletion src/util/prom_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

usage_ratio_query = "kepler_container_cpu_usage_per_package_ratio"
# mostly available
valid_container_query = "kepler_container_bpf_cpu_time_us_total"
valid_container_query = "kepler_container_bpf_cpu_time_ms_total"
node_info_query = "kepler_node_node_info"
cpu_frequency_info_query = "kepler_node_cpu_scaling_frequency_hertz"

Expand Down
6 changes: 3 additions & 3 deletions src/util/train_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

COUNTER_FEAUTRES = ["cache_miss", "cpu_cycles", "cpu_instructions"]
CGROUP_FEATURES = ["cgroupfs_cpu_usage_us", "cgroupfs_memory_usage_bytes", "cgroupfs_system_cpu_usage_us", "cgroupfs_user_cpu_usage_us"]
BPF_FEATURES = ["bpf_cpu_time_us", "bpf_page_cache_hit"]
BPF_FEATURES = ["bpf_cpu_time_ms", "bpf_page_cache_hit"]
IRQ_FEATURES = ["bpf_block_irq", "bpf_net_rx_irq", "bpf_net_tx_irq"]
ACCELERATE_FEATURES = ['accelerator_intel_qat']
WORKLOAD_FEATURES = COUNTER_FEAUTRES + CGROUP_FEATURES + BPF_FEATURES + IRQ_FEATURES + ACCELERATE_FEATURES
Expand Down Expand Up @@ -97,8 +97,8 @@ def is_single_source_feature_group(fg):
FeatureGroup.WorkloadOnly: "cpu_instructions",
FeatureGroup.CounterOnly: "cpu_instructions",
FeatureGroup.CgroupOnly: "cgroupfs_cpu_usage_us",
FeatureGroup.BPFOnly: "bpf_cpu_time_us",
FeatureGroup.BPFIRQ: "bpf_cpu_time_us",
FeatureGroup.BPFOnly: "bpf_cpu_time_ms",
FeatureGroup.BPFIRQ: "bpf_cpu_time_ms",
FeatureGroup.CounterIRQCombined: "cpu_instructions",
FeatureGroup.Basic: "cpu_instructions",
FeatureGroup.AcceleratorOnly: "accelerator_intel_qat",
Expand Down
2 changes: 1 addition & 1 deletion tests/data/prom_output/idle.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/data/prom_output/prom_response.json

Large diffs are not rendered by default.

0 comments on commit 0278c38

Please sign in to comment.