diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 9b2d76effd..47c7ae640a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -41,7 +41,7 @@ body: validations: required: true - + - type: textarea id: kubeVersion attributes: @@ -111,11 +111,11 @@ body: $ KEPLER_NAMESPACE=kepler # provide kepler configmap - $ kubectl get configmap kepler-cfm -n ${KEPLER_NAMESPACE} + $ kubectl get configmap kepler-cfm -n ${KEPLER_NAMESPACE} # paste output here # provide kepler deployment description - $ kubectl describe deployment kepler-exporter -n ${KEPLER_NAMESPACE} + $ kubectl describe deployment kepler-exporter -n ${KEPLER_NAMESPACE} ``` For standalone: @@ -141,4 +141,4 @@ body: value: |
-
\ No newline at end of file + diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index c0156a68b5..c7b92496fc 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -18,4 +18,4 @@ body: attributes: label: Why is this needed? validations: - required: true \ No newline at end of file + required: true diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0476c5b944..2fccaad8fc 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,4 +7,4 @@ updates: - package-ecosystem: github-actions directory: / schedule: - interval: daily \ No newline at end of file + interval: daily diff --git a/.github/release.yml b/.github/release.yml index e0c9b2032f..1017d72766 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -11,4 +11,4 @@ changelog: - '^fix.*' - title: 👒 Chores labels: - - '^chore.*' \ No newline at end of file + - '^chore.*' diff --git a/.github/workflows/baseimage_dispatch.yml b/.github/workflows/baseimage_dispatch.yml index 64859cb382..bbfb184250 100644 --- a/.github/workflows/baseimage_dispatch.yml +++ b/.github/workflows/baseimage_dispatch.yml @@ -10,4 +10,4 @@ jobs: pushImage: true secrets: username: ${{ secrets.BOT_NAME }} - password: ${{ secrets.BOT_TOKEN }} \ No newline at end of file + password: ${{ secrets.BOT_TOKEN }} diff --git a/.github/workflows/developer_local.yml b/.github/workflows/developer_local.yml index 8eb6d395db..9564b963db 100644 --- a/.github/workflows/developer_local.yml +++ b/.github/workflows/developer_local.yml @@ -14,12 +14,12 @@ jobs: - uses: actions/setup-go@v5 with: go-version-file: go.mod - - name: Prepare environment + - name: Prepare environment run: | brew install cpuid - cd doc/ && sudo ./dev/prepare_dev_env.sh && cd - + cd doc/ && sudo ./dev/prepare_dev_env.sh && cd - git config --global --add safe.directory /kepler - - name: Run + - name: Run run: make test-mac-verbose local_env: @@ -32,4 +32,4 @@ jobs: - name: local cluster set up run: make cluster-up - name: local container test - run: make container_test \ No newline at end of file + run: make container_test diff --git a/.github/workflows/equinix_metal_flow.yml b/.github/workflows/equinix_metal_flow.yml index 60507a4d4a..62397076dc 100644 --- a/.github/workflows/equinix_metal_flow.yml +++ b/.github/workflows/equinix_metal_flow.yml @@ -89,16 +89,16 @@ jobs: sudo systemctl daemon-reload sudo systemctl enable --now container-kepler # curl kepler port 8888 with 10 seconds timeout and retry 5 times; if it fails, exit with error - for i in {1..5}; do + for i in {1..5}; do echo "Attempt $i" # curl and get http code ret=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8888/metrics --max-time 10 --connect-timeout 10 || true) - if [ ${ret} -eq 200 ]; then - break + if [ ${ret} -eq 200 ]; then + break fi sleep 5 done - if [ ${ret} -ne 200 ]; then + if [ ${ret} -ne 200 ]; then echo "Kepler did not start in time" # exit 1 fi @@ -146,4 +146,4 @@ jobs: with: authToken: ${{ secrets.EQUINIX_API_TOKEN }} projectID: ${{ secrets.EQUINIX_PROJECT_ID }} - runnerName: ${{ needs.Install.outputs.runner-name }} \ No newline at end of file + runnerName: ${{ needs.Install.outputs.runner-name }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 720245872b..4355ea1bf4 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -20,7 +20,7 @@ jobs: # for each PR ensure for local developer usage developer_local: uses: ./.github/workflows/developer_local.yml - # for each PR run integration test + # for each PR run integration test integration_test: uses: ./.github/workflows/integration_test.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a19f8f9937..f5e88567c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,7 +75,7 @@ jobs: make containerized_build_container_rpm cd _output/rpmbuild/ sudo tar czvf /tmp/kepler.rpm.tar.gz RPMS/ - + - name: release rpm uses: actions/upload-release-asset@v1 env: @@ -85,12 +85,12 @@ jobs: asset_path: /tmp/kepler.rpm.tar.gz asset_name: kepler.rpm.tar.gz asset_content_type: application/gzip - + create-release-branch: name: Create release branch needs: [build] runs-on: ubuntu-latest - steps: + steps: - name: Create release branch uses: peterjgrainger/action-create-branch@v3.0.0 env: @@ -98,8 +98,8 @@ jobs: with: branch: ${{ github.event.inputs.release }} sha: '${{ github.event.pull_request.head.sha }}' - - + + push-image: name: Push image to the registry needs: [build] @@ -114,7 +114,7 @@ jobs: name: download Kepler image SBOM needs: [push-image] runs-on: ubuntu-latest - steps: + steps: - name: download from artifact uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/review_bot.yml b/.github/workflows/review_bot.yml index 1b5a95fdcd..6fec490bc3 100644 --- a/.github/workflows/review_bot.yml +++ b/.github/workflows/review_bot.yml @@ -35,7 +35,7 @@ jobs: github.event_name == 'pull_request' || github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.fork || (contains(github.event.comment.body, '@SeineSailor') && ( - github.event_name == 'issue_comment' || + github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' || github.event_name == 'discussion_comment')) || (github.event_name == 'issues' && contains(github.event.issue.body, '@SeineSailor')) || @@ -59,7 +59,7 @@ jobs: in_code_block=true fi fi - + # Process lines that are not in a code block or quoted if [[ "$in_code_block" = false && ! "$line" =~ ^\> ]]; then if echo "$line" | grep -q '@SeineSailor'; then diff --git a/.github/workflows/rpm.yml b/.github/workflows/rpm.yml index 56e5c50049..6a90766673 100644 --- a/.github/workflows/rpm.yml +++ b/.github/workflows/rpm.yml @@ -35,4 +35,4 @@ jobs: with: name: kepler_rpm_${{ steps.git_version.outputs.git_version }} path: /tmp/kepler.rpm.tar.gz - retention-days: 1 \ No newline at end of file + retention-days: 1 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 972a5b7cab..c2ca0d555f 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -5,7 +5,7 @@ name: Scorecard supply-chain security on: workflow_call: - + # Declare default permissions as read only. permissions: read-all diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 4052741c54..7568f15467 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -30,7 +30,7 @@ jobs: - name: Prepare environment run: | sudo apt-get install -y cpuid clang - cd doc/ && sudo ./dev/prepare_dev_env.sh && cd - + cd doc/ && sudo ./dev/prepare_dev_env.sh && cd - git config --global --add safe.directory /kepler - name: install libbpf uses: sustainable-computing-io/kepler-action@v0.0.6 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..e40398c32e --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,26 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + # Need to fix YAML first + # - id: check-yaml + - id: check-added-large-files + # Requires fixing and adding a configuration file + # - repo: https://github.com/adrienverge/yamllint + # rev: v1.35.1 + # hooks: + # - id: yamllint + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v17.0.6 + hooks: + - id: clang-format + types_or: [c] + - repo: https://github.com/golangci/golangci-lint + rev: v1.59.1 + hooks: + - id: golangci-lint +exclude: "^vendor/.*|^_output/.*|^bpfassets/libbpf/include/.*" diff --git a/ADOPTERS.md b/ADOPTERS.md index e1abaf214d..5cc3f1640e 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -2,4 +2,4 @@ The list of organisations who are using Kepler can be found at . -To join the adopters list, please follow [these instructions](https://sustainable-computing.io/project/contributing/). \ No newline at end of file +To join the adopters list, please follow [these instructions](https://sustainable-computing.io/project/contributing/). diff --git a/ADVISORS.md b/ADVISORS.md index 3f62ae2281..2c8f82e37d 100644 --- a/ADVISORS.md +++ b/ADVISORS.md @@ -4,4 +4,4 @@ |---|---|---| | Sandro Mazziotta | Red Hat | smazziot@redhat.com | | Eun K Lee | IBM | eunkyung.lee@us.ibm.com | -| Cathy Zhang | Intel | cathy.h.zhang@intel.com | \ No newline at end of file +| Cathy Zhang | Intel | cathy.h.zhang@intel.com | diff --git a/CHANGELOG.md b/CHANGELOG.md index 67ff8ebb26..9fe459746b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,4 +6,4 @@ in kepler 0.7 release - add initial NVIDIA DCGM support, this help monitor power consumption by NVIDIA GPU especially MIG instances. - add new curvefit regressors to predict component power consumption - add workload pipeline to build container base images on demand -- add ARM64 container image and RPM build support \ No newline at end of file +- add ARM64 container image and RPM build support diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ca74216b1b..b0eecd0236 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,7 +77,7 @@ Based on different k8s cluster, for example, [kind](https://kind.sigs.k8s.io/): Back to common checking process: - Deploy Kepler to a local kind cluster with image stored at local image registry. - Use kubectl to check that the change was applied as intended. - + ## Benchmark steps: ``` diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 7ee1874489..c5493dd6d7 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -2,7 +2,7 @@ ## Leadership Election -Qualified new maintainers are approved via consensus by the group of existing maintainers. +Qualified new maintainers are approved via consensus by the group of existing maintainers. ## Technical Committee @@ -18,7 +18,7 @@ The current list of technical committee members is published and updated in [Con ### Becoming a Technical Committee Member -Proficient in one or more of the following areas: +Proficient in one or more of the following areas: * Developing and maintaining Kepler core * Developing and maintaining Kepler deployment and integration (including Operator) * Developing and maintaining Kepler model server and models @@ -37,7 +37,7 @@ Responsibilities include: * Contribute non-trivial pull requests * Actively attend the community meetings * Perform code reviews on other's pull requests -* Regularly triage GitHub issues. +* Regularly triage GitHub issues. * Make sure that ongoing PRs are moving forward at the right pace or closing them * Monitor Kepler Slack (delayed response is perfectly acceptable), particularly for the area of your expertise @@ -46,7 +46,7 @@ Responsibilities include: Responsibilities include: * Perform code reviews on other's pull requests -* Regularly triage GitHub issues. +* Regularly triage GitHub issues. * Make sure that ongoing PRs are moving forward at the right pace or closing them * Monitor Kepler Slack (delayed response is perfectly acceptable), particularly for the area of your expertise @@ -60,4 +60,4 @@ Advisory committee provides guidance for the overall direction of the Kepler pro Members of the advisory committee are expected to be active in the Kepler community and attend the advisory committee meetings. Members are expected to serve for a term of one year, with the option to renew for additional terms. -Members are invited and approved by the Kepler maintainers. \ No newline at end of file +Members are invited and approved by the Kepler maintainers. diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 9bdd287d4b..3414a7469d 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -1,4 +1,4 @@ -# Maintainers +# Maintainers (as of May, 22nd, 2023) | Name | Company | Github ID | Email | @@ -15,8 +15,8 @@ | Marcelo Amaral | IBM | marceloamaral | marcelo.amaral1@ibm.com | | Niki Manoledaki | Weaveworks | nikimanoledaki | niki@weave.works | | Brad McCoy | Basiq | bradmccoydev | bradmccoydev@gmail.com | -| Sunyanan Choochotkaew | IBM | sunya-ch | sunyanan.choochotkaew1@ibm.com | -| Ruomeng Hao | Intel | ruomengh | ruomengh@intel.com | +| Sunyanan Choochotkaew | IBM | sunya-ch | sunyanan.choochotkaew1@ibm.com | +| Ruomeng Hao | Intel | ruomengh | ruomengh@intel.com | | Chen Wang | IBM | wangchen615 | chen.wang1@ibm.com | | Sunil Thaha | Red Hat | sthaha | sthaha@redhat.com | | Jie Ren | Intel | jiere | jie.ren@intel.com | diff --git a/README.md b/README.md index d2e4050c62..c989e6ab97 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Kepler (Kubernetes Efficient Power Level Exporter) uses eBPF to probe energy-rel As a CNCF Sandbox project, Kepler uses [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md) ## Architecture -Kepler Exporter exposes a variety of [metrics](https://sustainable-computing.io/design/metrics/) about the energy consumption of Kubernetes components such as Pods and Nodes. +Kepler Exporter exposes a variety of [metrics](https://sustainable-computing.io/design/metrics/) about the energy consumption of Kubernetes components such as Pods and Nodes. ![Architecture](doc/kepler-arch.png) diff --git a/automation/presubmit-tests/gofmt.sh b/automation/presubmit-tests/gofmt.sh index 9dd7b190fe..2ed8f4ac5c 100755 --- a/automation/presubmit-tests/gofmt.sh +++ b/automation/presubmit-tests/gofmt.sh @@ -32,4 +32,4 @@ if [ ! -z "$unformatted" ]; then exit 1 fi -exit 0 \ No newline at end of file +exit 0 diff --git a/data/legacy/power_model.csv b/data/legacy/power_model.csv index c30c857c57..ff1b876f24 100644 --- a/data/legacy/power_model.csv +++ b/data/legacy/power_model.csv @@ -1,2 +1,2 @@ Architecture,cpu_instruction,cpu_cycle,intercept_core,cache_misses,memory_usage,intercept_dram -Cascade Lake,0.0000005268224465,0.0000005484982329,152121.0472,0.000004112383656,0,-23.70284983 \ No newline at end of file +Cascade Lake,0.0000005268224465,0.0000005484982329,152121.0472,0.000004112383656,0,-23.70284983 diff --git a/data/model_weight/acpi_AbsPowerModel.json b/data/model_weight/acpi_AbsPowerModel.json index e2d4d7e692..a9e3077f54 100644 --- a/data/model_weight/acpi_AbsPowerModel.json +++ b/data/model_weight/acpi_AbsPowerModel.json @@ -1 +1 @@ -{"platform": {"All_Weights": {"Bias_Weight": 220.9079278650894, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 29.028228361462897}}}}} \ No newline at end of file +{"platform": {"All_Weights": {"Bias_Weight": 220.9079278650894, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 29.028228361462897}}}}} diff --git a/data/model_weight/acpi_DynPowerModel.json b/data/model_weight/acpi_DynPowerModel.json index a84d2d9f52..df09966a83 100644 --- a/data/model_weight/acpi_DynPowerModel.json +++ b/data/model_weight/acpi_DynPowerModel.json @@ -1 +1 @@ -{"platform": {"All_Weights": {"Bias_Weight": 49.56491877218095, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 28.501356366108837}}}}} \ No newline at end of file +{"platform": {"All_Weights": {"Bias_Weight": 49.56491877218095, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 28.501356366108837}}}}} diff --git a/data/model_weight/intel_rapl_AbsPowerModel.json b/data/model_weight/intel_rapl_AbsPowerModel.json index a933f97b3c..7c96474651 100644 --- a/data/model_weight/intel_rapl_AbsPowerModel.json +++ b/data/model_weight/intel_rapl_AbsPowerModel.json @@ -1 +1 @@ -{"package": {"All_Weights": {"Bias_Weight": 69.91739430907396, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 22.16772409328642}}}}, "core": {"All_Weights": {"Bias_Weight": 0.0, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 0.0}}}}, "uncore": {"All_Weights": {"Bias_Weight": 0.0, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 0.0}}}}, "dram": {"All_Weights": {"Bias_Weight": 47.142633336743344, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 3.57348245077466}}}}} \ No newline at end of file +{"package": {"All_Weights": {"Bias_Weight": 69.91739430907396, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 22.16772409328642}}}}, "core": {"All_Weights": {"Bias_Weight": 0.0, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 0.0}}}}, "uncore": {"All_Weights": {"Bias_Weight": 0.0, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 0.0}}}}, "dram": {"All_Weights": {"Bias_Weight": 47.142633336743344, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 3.57348245077466}}}}} diff --git a/data/model_weight/intel_rapl_DynPowerModel.json b/data/model_weight/intel_rapl_DynPowerModel.json index 92f62aa135..14791a9deb 100644 --- a/data/model_weight/intel_rapl_DynPowerModel.json +++ b/data/model_weight/intel_rapl_DynPowerModel.json @@ -1 +1 @@ -{"package": {"All_Weights": {"Bias_Weight": 38.856412561925055, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 22.258830113477515}}}}, "core": {"All_Weights": {"Bias_Weight": 0.0, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 0.0}}}}, "uncore": {"All_Weights": {"Bias_Weight": 0.0, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 0.0}}}}, "dram": {"All_Weights": {"Bias_Weight": 9.080889901856153, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 3.0358946796490924}}}}} \ No newline at end of file +{"package": {"All_Weights": {"Bias_Weight": 38.856412561925055, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 22.258830113477515}}}}, "core": {"All_Weights": {"Bias_Weight": 0.0, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 0.0}}}}, "uncore": {"All_Weights": {"Bias_Weight": 0.0, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 0.0}}}}, "dram": {"All_Weights": {"Bias_Weight": 9.080889901856153, "Categorical_Variables": {}, "Numerical_Variables": {"bpf_cpu_time_ms": {"scale": 5911.969193263386, "mean": 0, "variance": 0, "weight": 3.0358946796490924}}}}} diff --git a/doc/dev/README.md b/doc/dev/README.md index 3df513d258..ed5741cb1b 100644 --- a/doc/dev/README.md +++ b/doc/dev/README.md @@ -2,6 +2,7 @@ - [Getting Started](#getting-started) + - [Pre-requisites](#pre-requisites) - [Create a new ephemeral local kubernetes cluster](#create-a-new-ephemeral-local-kubernetes-cluster) - [Build and run kepler on your cluster](#build-and-run-kepler-on-your-cluster) - [To run kepler externally to the cluster](#to-run-kepler-externally-to-the-cluster) @@ -11,7 +12,31 @@ - [Build kepler and base multi-arch images](#build-kepler-and-base-multi-arch-images) -A quick start guide to get Kepler up and running inside your container-based development cluster. +A quick start guide to get Kepler up and running. + +## Pre-requisites + +This guide assumes you have the following installed: + +- [Docker](https://docs.docker.com/get-docker/) or [Podman](https://podman.io/getting-started/installation) +- [Go](https://golang.org/doc/install) +- [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/) + +In order to make contributions to Kepler, you need to have the following installed: + +- [Pre-commit](https://pre-commit.com/#install) + +You can install pre-commit by running the following command: + +```bash +pip install pre-commit +``` + +After installing pre-commit, you need to install the pre-commit hooks by running the following command: + +```bash +pre-commit install +``` ## Create a new ephemeral local kubernetes cluster diff --git a/doc/dev/role.yaml b/doc/dev/role.yaml index 5fbf36548d..5eb3c190f6 100644 --- a/doc/dev/role.yaml +++ b/doc/dev/role.yaml @@ -8,7 +8,7 @@ rules: verbs: ["get", "watch", "list"] - apiGroups: ["apps"] # "apps" is the API group for deployments resources: ["deployments"] - verbs: ["create", "get", "watch", "list"] + verbs: ["create", "get", "watch", "list"] - apiGroups: [""] resources: ["namespaces"] verbs: ["list", "get"] diff --git a/doc/dev/umls/pkg/bpfassets/bpfassets.svg b/doc/dev/umls/pkg/bpfassets/bpfassets.svg index 813715fc87..4307d6c12c 100644 --- a/doc/dev/umls/pkg/bpfassets/bpfassets.svg +++ b/doc/dev/umls/pkg/bpfassets/bpfassets.svg @@ -1 +1 @@ -attacherbccbpfassetsBccModuleTablesModule *bcc.ModuleTable *bcc.TableTableName stringCPUFreqTable *bcc.TableProcessBPFMetricsCGroupID uint64ThreadPID uint64PID uint64ProcessRunTime uint64TaskClockTime uint64CPUCycles uint64CPUInstr uint64CacheMisses uint64PageCacheHit uint64VecNR []uint16Command []byteperfCounterenabled bool EvType intEvConfig intModuleTableassetbytes []byteinfo os.FileInfobindataFileInfoname stringsize int64mode os.FileModemodTime time.TimeName() stringSize() int64Mode() os.FileModeModTime() time.TimeIsDir() boolSys()interface{}bintreeChildrenmap[string]*bintreeFuncfunc() (*asset, error) \ No newline at end of file +attacherbccbpfassetsBccModuleTablesModule *bcc.ModuleTable *bcc.TableTableName stringCPUFreqTable *bcc.TableProcessBPFMetricsCGroupID uint64ThreadPID uint64PID uint64ProcessRunTime uint64TaskClockTime uint64CPUCycles uint64CPUInstr uint64CacheMisses uint64PageCacheHit uint64VecNR []uint16Command []byteperfCounterenabled bool EvType intEvConfig intModuleTableassetbytes []byteinfo os.FileInfobindataFileInfoname stringsize int64mode os.FileModemodTime time.TimeName() stringSize() int64Mode() os.FileModeModTime() time.TimeIsDir() boolSys()interface{}bintreeChildrenmap[string]*bintreeFuncfunc() (*asset, error) diff --git a/doc/dev/umls/pkg/cgroup/cgroup.svg b/doc/dev/umls/pkg/cgroup/cgroup.svg index 991c97278f..4a0873ec72 100644 --- a/doc/dev/umls/pkg/cgroup/cgroup.svg +++ b/doc/dev/umls/pkg/cgroup/cgroup.svg @@ -1 +1 @@ -cgroupCCgroupStatHandlerSetCGroupStat(containerID string, CgroupStatMapmap[string]*types.UInt64StatCollection) errorCCgroupV1StatManagermanager cgroups.CgroupSetCGroupStat(containerID string, cgroupStatMapmap[string]*types.UInt64StatCollection) errorCCgroupV2StatManagermanager cgroups.ManagerSetCGroupStat(containerID string, cgroupStatMapmap[string]*types.UInt64StatCollection) errorContainerInfoContainerID stringContainerName stringPodName stringNamespace string \ No newline at end of file +cgroupCCgroupStatHandlerSetCGroupStat(containerID string, CgroupStatMapmap[string]*types.UInt64StatCollection) errorCCgroupV1StatManagermanager cgroups.CgroupSetCGroupStat(containerID string, cgroupStatMapmap[string]*types.UInt64StatCollection) errorCCgroupV2StatManagermanager cgroups.ManagerSetCGroupStat(containerID string, cgroupStatMapmap[string]*types.UInt64StatCollection) errorContainerInfoContainerID stringContainerName stringPodName stringNamespace string diff --git a/doc/dev/umls/pkg/collector/collector.plantuml b/doc/dev/umls/pkg/collector/collector.plantuml index 794aa72e8d..f9350dcbc4 100644 --- a/doc/dev/umls/pkg/collector/collector.plantuml +++ b/doc/dev/umls/pkg/collector/collector.plantuml @@ -16,26 +16,26 @@ namespace collector { + ContainerStats map[string]*stats.ContainerStats + VMStats map[string]*stats.VMStats - - resetDeltaValue() - - updateResourceUtilizationMetrics() - - updateNodeAvgCPUFrequencyFromEBPF() - - updateNodeResourceUtilizationMetrics(wg *sync.WaitGroup) - - updateProcessResourceUtilizationMetrics(wg *sync.WaitGroup) - - updateContainerResourceUtilizationMetrics() - - handleIdlingProcess(pStat *stats.ProcessStats) - - handleInactiveContainers(foundContainer map[string]bool) - - handleInactiveVM(foundVM map[string]bool) - - printDebugMetrics() - - createContainerStatsIfNotExist(containerID string, cGroupID uint64, pid uint64, withCGroupID bool) + - resetDeltaValue() + - updateResourceUtilizationMetrics() + - updateNodeAvgCPUFrequencyFromEBPF() + - updateNodeResourceUtilizationMetrics(wg *sync.WaitGroup) + - updateProcessResourceUtilizationMetrics(wg *sync.WaitGroup) + - updateContainerResourceUtilizationMetrics() + - handleIdlingProcess(pStat *stats.ProcessStats) + - handleInactiveContainers(foundContainer map[string]bool) + - handleInactiveVM(foundVM map[string]bool) + - printDebugMetrics() + - createContainerStatsIfNotExist(containerID string, cGroupID uint64, pid uint64, withCGroupID bool) + Initialize() error - + Destroy() - + Update() - + UpdateEnergyUtilizationMetrics() - + UpdateNodeEnergyUtilizationMetrics() - + UpdateProcessEnergyUtilizationMetrics() - + AggregateProcessResourceUtilizationMetrics() - + AggregateProcessEnergyUtilizationMetrics() + + Destroy() + + Update() + + UpdateEnergyUtilizationMetrics() + + UpdateNodeEnergyUtilizationMetrics() + + UpdateProcessEnergyUtilizationMetrics() + + AggregateProcessResourceUtilizationMetrics() + + AggregateProcessEnergyUtilizationMetrics() } } @@ -68,8 +68,8 @@ namespace stats { + CgroupStatHandler cgroup.CCgroupStatHandler + CgroupStatMap map[string]*types.UInt64StatCollection - + ResetDeltaValues() - + SetLatestProcess(pid uint64) + + ResetDeltaValues() + + SetLatestProcess(pid uint64) + String() string + UpdateCgroupMetrics() error @@ -77,10 +77,10 @@ namespace stats { class NodeStats << (S,Aquamarine) >> { + IdleResUtilization map[string]uint64 - + ResetDeltaValues() - + UpdateIdleEnergyWithMinValue(isComponentsSystemCollectionSupported bool) - + CalcIdleEnergy(absM string, idleM string, resouceUtil string) - + SetNodeOtherComponentsEnergy() + + ResetDeltaValues() + + UpdateIdleEnergyWithMinValue(isComponentsSystemCollectionSupported bool) + + CalcIdleEnergy(absM string, idleM string, resouceUtil string) + + SetNodeOtherComponentsEnergy() + String() string } @@ -92,7 +92,7 @@ namespace stats { + Command string + IdleCounter int - + ResetDeltaValues() + + ResetDeltaValues() + String() string } @@ -100,10 +100,10 @@ namespace stats { + ResourceUsage map[string]*types.UInt64StatCollection + EnergyUsage map[string]*types.UInt64StatCollection - + ResetDeltaValues() + + ResetDeltaValues() + String() string - + UpdateDynEnergy() - + CalcDynEnergy(absM string, idleM string, dynM string, id string) + + UpdateDynEnergy() + + CalcDynEnergy(absM string, idleM string, dynM string, id string) + ToEstimatorValues(featuresName []string, shouldNormalize bool) []float64 } @@ -111,7 +111,7 @@ namespace stats { + PID uint64 + VMID string - + ResetDeltaValues() + + ResetDeltaValues() } } @@ -131,7 +131,7 @@ namespace types { + Delta uint64 + String() string - + ResetDeltaValues() + + ResetDeltaValues() + AddNewDelta(newDelta uint64) error + SetNewDelta(newDelta uint64) error + SetNewDeltaValue(newDelta uint64, sum bool) error @@ -143,12 +143,12 @@ namespace types { class UInt64StatCollection << (S,Aquamarine) >> { + Stat map[string]*UInt64Stat - + SetAggrStat(key string, newAggr uint64) - + AddDeltaStat(key string, newDelta uint64) - + SetDeltaStat(key string, newDelta uint64) + + SetAggrStat(key string, newAggr uint64) + + AddDeltaStat(key string, newDelta uint64) + + SetDeltaStat(key string, newDelta uint64) + SumAllDeltaValues() uint64 + SumAllAggrValues() uint64 - + ResetDeltaValues() + + ResetDeltaValues() + String() string } diff --git a/doc/dev/umls/pkg/collector/collector.svg b/doc/dev/umls/pkg/collector/collector.svg index 6eb7fef86f..2d0c70d8aa 100644 --- a/doc/dev/umls/pkg/collector/collector.svg +++ b/doc/dev/umls/pkg/collector/collector.svg @@ -1 +1 @@ -bpfcollectorstatscgrouptypesProcessBPFMetricsattacher.ProcessBPFMetricsCollectorNodeStats stats.NodeStatsProcessStatsmap[uint64]*stats.ProcessStatsContainerStatsmap[string]*stats.ContainerStatsVMStatsmap[string]*stats.VMStatsresetDeltaValue()updateResourceUtilizationMetrics()updateNodeAvgCPUFrequencyFromEBPF()updateNodeResourceUtilizationMetrics(wg *sync.WaitGroup)updateProcessResourceUtilizationMetrics(wg *sync.WaitGroup)updateContainerResourceUtilizationMetrics()handleIdlingProcess(pStat *stats.ProcessStats)handleInactiveContainers(foundContainermap[string]bool)handleInactiveVM(foundVMmap[string]bool)printDebugMetrics()createContainerStatsIfNotExist(containerID string, cGroupID uint64, pid uint64, withCGroupID bool) Initialize() errorDestroy()Update()UpdateEnergyUtilizationMetrics()UpdateNodeEnergyUtilizationMetrics()UpdateProcessEnergyUtilizationMetrics()AggregateProcessResourceUtilizationMetrics()AggregateProcessEnergyUtilizationMetrics()ContainerStatsPIDSmap[uint64]boolContainerID stringContainerName stringPodName stringNamespace stringCgroupStatHandler cgroup.CCgroupStatHandlerCgroupStatMapmap[string]*types.UInt64StatCollectionResetDeltaValues()SetLatestProcess(pid uint64)String() stringUpdateCgroupMetrics() errorNodeStatsIdleResUtilizationmap[string]uint64ResetDeltaValues()UpdateIdleEnergyWithMinValue(isComponentsSystemCollectionSupported bool)CalcIdleEnergy(absM string, idleM string, resouceUtil string)SetNodeOtherComponentsEnergy()String() stringProcessStatsPID uint64CGroupID uint64ContainerID stringVMID stringCommand stringIdleCounter intResetDeltaValues()String() stringVMStatsPID uint64VMID stringResetDeltaValues()CPUModelDataCore stringUarch stringFamily stringModel stringStepping stringCPUScpusInfo []CPUModelDataStatsResourceUsagemap[string]*types.UInt64StatCollectionEnergyUsagemap[string]*types.UInt64StatCollectionResetDeltaValues()String() stringUpdateDynEnergy()CalcDynEnergy(absM string, idleM string, dynM string, id string)ToEstimatorValues(featuresName []string, shouldNormalize bool) []float64CCgroupStatHandlerUInt64StatCollectionStatmap[string]*UInt64StatSetAggrStat(key string, newAggr uint64)AddDeltaStat(key string, newDelta uint64)SetDeltaStat(key string, newDelta uint64)SumAllDeltaValues() uint64SumAllAggrValues() uint64ResetDeltaValues()String() stringUInt64StatAggr uint64Delta uint64String() stringResetDeltaValues()AddNewDelta(newDelta uint64) errorSetNewDelta(newDelta uint64) errorSetNewDeltaValue(newDelta uint64, sum bool) errorSetNewAggr(newAggr uint64) errorGetDelta() uint64GetAggr() uint64 \ No newline at end of file +bpfcollectorstatscgrouptypesProcessBPFMetricsattacher.ProcessBPFMetricsCollectorNodeStats stats.NodeStatsProcessStatsmap[uint64]*stats.ProcessStatsContainerStatsmap[string]*stats.ContainerStatsVMStatsmap[string]*stats.VMStatsresetDeltaValue()updateResourceUtilizationMetrics()updateNodeAvgCPUFrequencyFromEBPF()updateNodeResourceUtilizationMetrics(wg *sync.WaitGroup)updateProcessResourceUtilizationMetrics(wg *sync.WaitGroup)updateContainerResourceUtilizationMetrics()handleIdlingProcess(pStat *stats.ProcessStats)handleInactiveContainers(foundContainermap[string]bool)handleInactiveVM(foundVMmap[string]bool)printDebugMetrics()createContainerStatsIfNotExist(containerID string, cGroupID uint64, pid uint64, withCGroupID bool) Initialize() errorDestroy()Update()UpdateEnergyUtilizationMetrics()UpdateNodeEnergyUtilizationMetrics()UpdateProcessEnergyUtilizationMetrics()AggregateProcessResourceUtilizationMetrics()AggregateProcessEnergyUtilizationMetrics()ContainerStatsPIDSmap[uint64]boolContainerID stringContainerName stringPodName stringNamespace stringCgroupStatHandler cgroup.CCgroupStatHandlerCgroupStatMapmap[string]*types.UInt64StatCollectionResetDeltaValues()SetLatestProcess(pid uint64)String() stringUpdateCgroupMetrics() errorNodeStatsIdleResUtilizationmap[string]uint64ResetDeltaValues()UpdateIdleEnergyWithMinValue(isComponentsSystemCollectionSupported bool)CalcIdleEnergy(absM string, idleM string, resouceUtil string)SetNodeOtherComponentsEnergy()String() stringProcessStatsPID uint64CGroupID uint64ContainerID stringVMID stringCommand stringIdleCounter intResetDeltaValues()String() stringVMStatsPID uint64VMID stringResetDeltaValues()CPUModelDataCore stringUarch stringFamily stringModel stringStepping stringCPUScpusInfo []CPUModelDataStatsResourceUsagemap[string]*types.UInt64StatCollectionEnergyUsagemap[string]*types.UInt64StatCollectionResetDeltaValues()String() stringUpdateDynEnergy()CalcDynEnergy(absM string, idleM string, dynM string, id string)ToEstimatorValues(featuresName []string, shouldNormalize bool) []float64CCgroupStatHandlerUInt64StatCollectionStatmap[string]*UInt64StatSetAggrStat(key string, newAggr uint64)AddDeltaStat(key string, newDelta uint64)SetDeltaStat(key string, newDelta uint64)SumAllDeltaValues() uint64SumAllAggrValues() uint64ResetDeltaValues()String() stringUInt64StatAggr uint64Delta uint64String() stringResetDeltaValues()AddNewDelta(newDelta uint64) errorSetNewDelta(newDelta uint64) errorSetNewDeltaValue(newDelta uint64, sum bool) errorSetNewAggr(newAggr uint64) errorGetDelta() uint64GetAggr() uint64 diff --git a/doc/dev/umls/pkg/config/config.svg b/doc/dev/umls/pkg/config/config.svg index bcfda8ccf0..4827bae772 100644 --- a/doc/dev/umls/pkg/config/config.svg +++ b/doc/dev/umls/pkg/config/config.svg @@ -1 +1 @@ -configClientgetUnixName() (unix.Utsname, error)getCgroupV2File() stringconfiggetUnixName() (unix.Utsname, error)getCgroupV2File() string \ No newline at end of file +configClientgetUnixName() (unix.Utsname, error)getCgroupV2File() stringconfiggetUnixName() (unix.Utsname, error)getCgroupV2File() string diff --git a/doc/dev/umls/pkg/kubelet/kubelet.svg b/doc/dev/umls/pkg/kubelet/kubelet.svg index c2c685bd6a..0d6aba5752 100644 --- a/doc/dev/umls/pkg/kubelet/kubelet.svg +++ b/doc/dev/umls/pkg/kubelet/kubelet.svg @@ -1 +1 @@ -kubeletKubeletPodListerListPods() (*[]v1.Pod, error) \ No newline at end of file +kubeletKubeletPodListerListPods() (*[]v1.Pod, error) diff --git a/doc/dev/umls/pkg/kubernetes/kubernetes.plantuml b/doc/dev/umls/pkg/kubernetes/kubernetes.plantuml index f16151d369..52877e8d9d 100644 --- a/doc/dev/umls/pkg/kubernetes/kubernetes.plantuml +++ b/doc/dev/umls/pkg/kubernetes/kubernetes.plantuml @@ -9,14 +9,14 @@ namespace kubernetes { + ResourceKind string + ContainerStats *map[string]*stats.ContainerStats - - handleUpdate(oldObj interface{}, newObj interface{}) - - handleAdd(obj interface{}) + - handleUpdate(oldObj interface{}, newObj interface{}) + - handleAdd(obj interface{}) - fillInfo(pod *v1.Pod, containers []v1.ContainerStatus) error - - handleDeleted(obj interface{}) - - deleteInfo(containers []v1.ContainerStatus) + - handleDeleted(obj interface{}) + - deleteInfo(containers []v1.ContainerStatus) - + Run() - + Stop() + + Run() + + Stop() } } diff --git a/doc/dev/umls/pkg/kubernetes/kubernetes.svg b/doc/dev/umls/pkg/kubernetes/kubernetes.svg index c8f8b7d53d..286ba84b25 100644 --- a/doc/dev/umls/pkg/kubernetes/kubernetes.svg +++ b/doc/dev/umls/pkg/kubernetes/kubernetes.svg @@ -1 +1 @@ -kubernetesstatssyncObjListWatcherk8sCli *kubernetes.Clientsetinformer cache.SharedInformerstopChannelchan struct{} Mx *sync.MutexResourceKind stringContainerStats *map[string]*stats.ContainerStatshandleUpdate(oldObjinterface{}, newObjinterface{})handleAdd(objinterface{})fillInfo(pod *v1.Pod, containers []v1.ContainerStatus) errorhandleDeleted(objinterface{})deleteInfo(containers []v1.ContainerStatus) Run()Stop()ContainerStatsMutex \ No newline at end of file +kubernetesstatssyncObjListWatcherk8sCli *kubernetes.Clientsetinformer cache.SharedInformerstopChannelchan struct{} Mx *sync.MutexResourceKind stringContainerStats *map[string]*stats.ContainerStatshandleUpdate(oldObjinterface{}, newObjinterface{})handleAdd(objinterface{})fillInfo(pod *v1.Pod, containers []v1.ContainerStatus) errorhandleDeleted(objinterface{})deleteInfo(containers []v1.ContainerStatus) Run()Stop()ContainerStatsMutex diff --git a/doc/dev/umls/pkg/libvirt/libvirt.svg b/doc/dev/umls/pkg/libvirt/libvirt.svg index e65693b39a..5b785edea9 100644 --- a/doc/dev/umls/pkg/libvirt/libvirt.svg +++ b/doc/dev/umls/pkg/libvirt/libvirt.svg @@ -1 +1 @@ -Welcome to PlantUML! You can start with a simple UML Diagram like: Bob->Alice: Hello Or class Example You will find more information about PlantUML syntax onhttps://plantuml.com (Details by typinglicensekeyword)      \ No newline at end of file +Welcome to PlantUML! You can start with a simple UML Diagram like: Bob->Alice: Hello Or class Example You will find more information about PlantUML syntax onhttps://plantuml.com (Details by typinglicensekeyword)      diff --git a/doc/dev/umls/pkg/manager/manager.svg b/doc/dev/umls/pkg/manager/manager.svg index 51ac559414..a97bc2ce5e 100644 --- a/doc/dev/umls/pkg/manager/manager.svg +++ b/doc/dev/umls/pkg/manager/manager.svg @@ -1 +1 @@ -managercollectorkubernetesmetricsCollectorManagerStatsCollector *collector.CollectorPrometheusCollector *metrics.PrometheusExporterWatcher *kubernetes.ObjListWatcherStart() errorCollectorObjListWatcherPrometheusExporter \ No newline at end of file +managercollectorkubernetesmetricsCollectorManagerStatsCollector *collector.CollectorPrometheusCollector *metrics.PrometheusExporterWatcher *kubernetes.ObjListWatcherStart() errorCollectorObjListWatcherPrometheusExporter diff --git a/doc/dev/umls/pkg/metrics/metrics.plantuml b/doc/dev/umls/pkg/metrics/metrics.plantuml index 81c1ae0826..55663a3e1d 100644 --- a/doc/dev/umls/pkg/metrics/metrics.plantuml +++ b/doc/dev/umls/pkg/metrics/metrics.plantuml @@ -7,11 +7,11 @@ namespace container { + ContainerStats map[string]*stats.ContainerStats + Mx *sync.Mutex - - initMetrics() - - collectTotalEnergyMetrics(ch chan prometheus.Metric, container *stats.ContainerStats) + - initMetrics() + - collectTotalEnergyMetrics(ch chan prometheus.Metric, container *stats.ContainerStats) - + Describe(ch chan *prometheus.Desc) - + Collect(ch chan prometheus.Metric) + + Describe(ch chan *prometheus.Desc) + + Collect(ch chan prometheus.Metric) } } @@ -54,10 +54,10 @@ namespace metrics { + NodeStatsCollector prometheus.Collector + Mx sync.Mutex - + NewProcessCollector(processMetrics map[uint64]*stats.ProcessStats) - + NewContainerCollector(containerMetrics map[string]*stats.ContainerStats) - + NewVMCollector(vmMetrics map[string]*stats.VMStats) - + NewNodeCollector(nodeMetrics *stats.NodeStats) + + NewProcessCollector(processMetrics map[uint64]*stats.ProcessStats) + + NewContainerCollector(containerMetrics map[string]*stats.ContainerStats) + + NewVMCollector(vmMetrics map[string]*stats.VMStats) + + NewNodeCollector(nodeMetrics *stats.NodeStats) + RegisterMetrics() *prometheus.Registry } @@ -75,10 +75,10 @@ namespace node { + NodeStats *stats.NodeStats + Mx *sync.Mutex - - initMetrics() + - initMetrics() - + Describe(ch chan *prometheus.Desc) - + Collect(ch chan prometheus.Metric) + + Describe(ch chan *prometheus.Desc) + + Collect(ch chan prometheus.Metric) } } @@ -95,10 +95,10 @@ namespace process { + ProcessStats map[uint64]*stats.ProcessStats + Mx *sync.Mutex - - initMetrics() + - initMetrics() - + Describe(ch chan *prometheus.Desc) - + Collect(ch chan prometheus.Metric) + + Describe(ch chan *prometheus.Desc) + + Collect(ch chan prometheus.Metric) } } @@ -115,10 +115,10 @@ namespace virtualmachine { + VMStats map[string]*stats.VMStats + Mx *sync.Mutex - - initMetrics() + - initMetrics() - + Describe(ch chan *prometheus.Desc) - + Collect(ch chan prometheus.Metric) + + Describe(ch chan *prometheus.Desc) + + Collect(ch chan prometheus.Metric) } } diff --git a/doc/dev/umls/pkg/metrics/metrics.svg b/doc/dev/umls/pkg/metrics/metrics.svg index 006e90aa92..6f5e703e6e 100644 --- a/doc/dev/umls/pkg/metrics/metrics.svg +++ b/doc/dev/umls/pkg/metrics/metrics.svg @@ -1 +1 @@ -containerstatssyncmetricfactorymetricsprometheusnodeprocessvirtualmachinecollectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric ContainerStatsmap[string]*stats.ContainerStatsMx *sync.MutexinitMetrics()collectTotalEnergyMetrics(chchanprometheus.Metric, container *stats.ContainerStats) Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)ContainerStatsNodeStatsProcessStatsVMStatsMutexPromMetricDesc() *prometheus.DescMustMetric(value float64, labelValues ...string) prometheus.MetricbpfGaugedesc *prometheus.DescDesc() *prometheus.DescMustMetric(value float64, labelValues ...string) prometheus.MetricpromCounterdesc *prometheus.DescDesc() *prometheus.DescMustMetric(value float64, labelValues ...string) prometheus.MetricPrometheusExporterProcessStatsCollector prometheus.CollectorContainerStatsCollector prometheus.CollectorVMStatsCollector prometheus.CollectorNodeStatsCollector prometheus.CollectorMx sync.MutexNewProcessCollector(processMetricsmap[uint64]*stats.ProcessStats)NewContainerCollector(containerMetricsmap[string]*stats.ContainerStats)NewVMCollector(vmMetricsmap[string]*stats.VMStats)NewNodeCollector(nodeMetrics *stats.NodeStats)RegisterMetrics() *prometheus.RegistryCollectorcollectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric NodeStats *stats.NodeStatsMx *sync.MutexinitMetrics() Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)collectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric ProcessStatsmap[uint64]*stats.ProcessStatsMx *sync.MutexinitMetrics() Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)collectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric VMStatsmap[string]*stats.VMStatsMx *sync.MutexinitMetrics() Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric) \ No newline at end of file +containerstatssyncmetricfactorymetricsprometheusnodeprocessvirtualmachinecollectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric ContainerStatsmap[string]*stats.ContainerStatsMx *sync.MutexinitMetrics()collectTotalEnergyMetrics(chchanprometheus.Metric, container *stats.ContainerStats) Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)ContainerStatsNodeStatsProcessStatsVMStatsMutexPromMetricDesc() *prometheus.DescMustMetric(value float64, labelValues ...string) prometheus.MetricbpfGaugedesc *prometheus.DescDesc() *prometheus.DescMustMetric(value float64, labelValues ...string) prometheus.MetricpromCounterdesc *prometheus.DescDesc() *prometheus.DescMustMetric(value float64, labelValues ...string) prometheus.MetricPrometheusExporterProcessStatsCollector prometheus.CollectorContainerStatsCollector prometheus.CollectorVMStatsCollector prometheus.CollectorNodeStatsCollector prometheus.CollectorMx sync.MutexNewProcessCollector(processMetricsmap[uint64]*stats.ProcessStats)NewContainerCollector(containerMetricsmap[string]*stats.ContainerStats)NewVMCollector(vmMetricsmap[string]*stats.VMStats)NewNodeCollector(nodeMetrics *stats.NodeStats)RegisterMetrics() *prometheus.RegistryCollectorcollectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric NodeStats *stats.NodeStatsMx *sync.MutexinitMetrics() Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)collectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric ProcessStatsmap[uint64]*stats.ProcessStatsMx *sync.MutexinitMetrics() Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)collectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric VMStatsmap[string]*stats.VMStatsMx *sync.MutexinitMetrics() Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric) diff --git a/doc/dev/umls/pkg/model/model.plantuml b/doc/dev/umls/pkg/model/model.plantuml index 01408bf14d..caf0ac3cd7 100644 --- a/doc/dev/umls/pkg/model/model.plantuml +++ b/doc/dev/umls/pkg/model/model.plantuml @@ -32,16 +32,16 @@ namespace local { - loadWeightFromURLorLocal() (*ComponentModelWeights, error) - loadWeightFromLocal() ([]byte, error) - loadWeightFromURL() ([]byte, error) - - addFloatFeatureValues(x []float64) + - addFloatFeatureValues(x []float64) + Start() error + GetPlatformPower(isIdlePower bool) ([]float64, error) + GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error) + GetGPUPower(isIdlePower bool) ([]float64, error) - + AddProcessFeatureValues(x []float64) - + AddNodeFeatureValues(x []float64) - + AddDesiredOutValue(y float64) - + ResetSampleIdx() + + AddProcessFeatureValues(x []float64) + + AddNodeFeatureValues(x []float64) + + AddDesiredOutValue(y float64) + + ResetSampleIdx() + Train() error + IsEnabled() bool + GetModelType() types.ModelType @@ -82,10 +82,10 @@ namespace local { + GetPlatformPower(isIdlePower bool) ([]float64, error) + GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error) + GetGPUPower(isIdlePower bool) ([]float64, error) - + AddProcessFeatureValues(x []float64) - + AddNodeFeatureValues(x []float64) - + AddDesiredOutValue(y float64) - + ResetSampleIdx() + + AddProcessFeatureValues(x []float64) + + AddNodeFeatureValues(x []float64) + + AddDesiredOutValue(y float64) + + ResetSampleIdx() + Train() error + IsEnabled() bool + GetModelType() types.ModelType @@ -111,10 +111,10 @@ namespace local { namespace model { interface PowerModelInterface { - + AddProcessFeatureValues(x []float64) - + AddNodeFeatureValues(x []float64) - + AddDesiredOutValue(y float64) - + ResetSampleIdx() + + AddProcessFeatureValues(x []float64) + + AddNodeFeatureValues(x []float64) + + AddDesiredOutValue(y float64) + + ResetSampleIdx() + Train() error + IsEnabled() bool + GetModelType() types.ModelType @@ -151,16 +151,16 @@ namespace sidecar { + SystemMetaDataFeatureValues []string - makeRequest(usageValues [][]float64, systemValues []string) (interface{}, error) - - addFloatFeatureValues(x []float64) + - addFloatFeatureValues(x []float64) + Start() error + GetPlatformPower(isIdlePower bool) ([]float64, error) + GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error) + GetGPUPower(isIdlePower bool) ([]float64, error) - + AddProcessFeatureValues(x []float64) - + AddNodeFeatureValues(x []float64) - + AddDesiredOutValue(y float64) - + ResetSampleIdx() + + AddProcessFeatureValues(x []float64) + + AddNodeFeatureValues(x []float64) + + AddDesiredOutValue(y float64) + + ResetSampleIdx() + Train() error + IsEnabled() bool + GetModelType() types.ModelType diff --git a/doc/dev/umls/pkg/model/model.svg b/doc/dev/umls/pkg/model/model.svg index 804894b1eb..d19ff65a23 100644 --- a/doc/dev/umls/pkg/model/model.svg +++ b/doc/dev/umls/pkg/model/model.svg @@ -1 +1 @@ -localmodeltypessidecarbuiltinAllWeightsBiasWeight float64CategoricalVariablesmap[string]map[string]CategoricalFeatureNumericalVariablesmap[string]NormalizedNumericalFeatureCategoricalFeatureWeight float64LinearRegressorfloatFeatureValues [][]float64floatFeatureValuesForIdlePower [][]float64xidx intenabled boolmodelWeight *ComponentModelWeights ModelServerEndpoint stringOutputType types.ModelOutputTypeEnergySource stringTrainerName stringSelectFilter stringModelWeightsURL stringModelWeightsFilepath stringFloatFeatureNames []stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringgetWeightFromServer() (*ComponentModelWeights, error)loadWeightFromURLorLocal() (*ComponentModelWeights, error)loadWeightFromLocal() ([]byte, error)loadWeightFromURL() ([]byte, error)addFloatFeatureValues(x []float64) Start() errorGetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)AddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringModelRequestMetricNames []stringOutputType stringEnergySource stringNodeType intWeight boolTrainerName stringSelectFilter stringModelWeightsgetIndexedWeights(usageMetrics []string, systemFeatures []string) ([]map[string]CategoricalFeature, []NormalizedNumericalFeature)predict(usageMetricNames []string, usageMetricValues [][]float64, systemMetaDataFeatureNames []string, systemMetaDataFeatureValues []string) []float64NormalizedNumericalFeatureScale float64Weight float64RatioPowerModelprocessFeatureValues [][]float64nodeFeatureValues []float64xidx int NodeFeatureNames []stringProcessFeatureNames []stringgetPowerByRatio(processIdx int, resUsageFeature int, nodePowerFeature int, numProcesses float64) float64 GetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)AddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringComponentFeaturesComponentModelWeightsPlaformFeaturesmap[string]ModelWeightsPowerModelInterfaceAddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringGetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)ModelOutputTypeString() stringModelConfigModelType ModelTypeModelOutputType ModelOutputTypeTrainerName stringEnergySource stringSelectFilter stringInitModelURL stringInitModelFilepath stringIsNodePowerModel boolProcessFeatureNames []stringNodeFeatureNames []stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringModelTypeString() stringComponentPowerResponsePowersmap[string][]float64Message stringEstimatorSidecarfloatFeatureValues [][]float64floatFeatureValuesForIdlePower [][]float64xidx intenabled bool Socket stringOutputType types.ModelOutputTypeEnergySource stringTrainerName stringSelectFilter stringFloatFeatureNames []stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringmakeRequest(usageValues [][]float64, systemValues []string) (interface{}, error)addFloatFeatureValues(x []float64) Start() errorGetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)AddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringPlatformPowerResponsePowers []float64Message stringPowerRequestFloatFeatureNames []stringUsageValues [][]float64OutputType stringEnergySource stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringTrainerName stringSelectFilter stringint \ No newline at end of file +localmodeltypessidecarbuiltinAllWeightsBiasWeight float64CategoricalVariablesmap[string]map[string]CategoricalFeatureNumericalVariablesmap[string]NormalizedNumericalFeatureCategoricalFeatureWeight float64LinearRegressorfloatFeatureValues [][]float64floatFeatureValuesForIdlePower [][]float64xidx intenabled boolmodelWeight *ComponentModelWeights ModelServerEndpoint stringOutputType types.ModelOutputTypeEnergySource stringTrainerName stringSelectFilter stringModelWeightsURL stringModelWeightsFilepath stringFloatFeatureNames []stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringgetWeightFromServer() (*ComponentModelWeights, error)loadWeightFromURLorLocal() (*ComponentModelWeights, error)loadWeightFromLocal() ([]byte, error)loadWeightFromURL() ([]byte, error)addFloatFeatureValues(x []float64) Start() errorGetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)AddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringModelRequestMetricNames []stringOutputType stringEnergySource stringNodeType intWeight boolTrainerName stringSelectFilter stringModelWeightsgetIndexedWeights(usageMetrics []string, systemFeatures []string) ([]map[string]CategoricalFeature, []NormalizedNumericalFeature)predict(usageMetricNames []string, usageMetricValues [][]float64, systemMetaDataFeatureNames []string, systemMetaDataFeatureValues []string) []float64NormalizedNumericalFeatureScale float64Weight float64RatioPowerModelprocessFeatureValues [][]float64nodeFeatureValues []float64xidx int NodeFeatureNames []stringProcessFeatureNames []stringgetPowerByRatio(processIdx int, resUsageFeature int, nodePowerFeature int, numProcesses float64) float64 GetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)AddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringComponentFeaturesComponentModelWeightsPlaformFeaturesmap[string]ModelWeightsPowerModelInterfaceAddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringGetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)ModelOutputTypeString() stringModelConfigModelType ModelTypeModelOutputType ModelOutputTypeTrainerName stringEnergySource stringSelectFilter stringInitModelURL stringInitModelFilepath stringIsNodePowerModel boolProcessFeatureNames []stringNodeFeatureNames []stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringModelTypeString() stringComponentPowerResponsePowersmap[string][]float64Message stringEstimatorSidecarfloatFeatureValues [][]float64floatFeatureValuesForIdlePower [][]float64xidx intenabled bool Socket stringOutputType types.ModelOutputTypeEnergySource stringTrainerName stringSelectFilter stringFloatFeatureNames []stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringmakeRequest(usageValues [][]float64, systemValues []string) (interface{}, error)addFloatFeatureValues(x []float64) Start() errorGetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)AddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringPlatformPowerResponsePowers []float64Message stringPowerRequestFloatFeatureNames []stringUsageValues [][]float64OutputType stringEnergySource stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringTrainerName stringSelectFilter stringint diff --git a/doc/dev/umls/pkg/nodecred/nodecred.svg b/doc/dev/umls/pkg/nodecred/nodecred.svg index 48efdebf98..a0d89f313b 100644 --- a/doc/dev/umls/pkg/nodecred/nodecred.svg +++ b/doc/dev/umls/pkg/nodecred/nodecred.svg @@ -1 +1 @@ -nodecredNodeCredInterfaceGetNodeCredByNodeName(nodeName string, target string) (map[string]string, error)IsSupported(infomap[string]string) boolcsvNodeCredGetNodeCredByNodeName(nodeName string, target string) (map[string]string, error)IsSupported(infomap[string]string) bool \ No newline at end of file +nodecredNodeCredInterfaceGetNodeCredByNodeName(nodeName string, target string) (map[string]string, error)IsSupported(infomap[string]string) boolcsvNodeCredGetNodeCredByNodeName(nodeName string, target string) (map[string]string, error)IsSupported(infomap[string]string) bool diff --git a/doc/dev/umls/pkg/pkg.plantuml b/doc/dev/umls/pkg/pkg.plantuml index 337512a37f..22bd22e8bc 100644 --- a/doc/dev/umls/pkg/pkg.plantuml +++ b/doc/dev/umls/pkg/pkg.plantuml @@ -111,26 +111,26 @@ namespace collector { + ContainerStats map[string]*stats.ContainerStats + VMStats map[string]*stats.VMStats - - resetDeltaValue() - - updateResourceUtilizationMetrics() - - updateNodeAvgCPUFrequencyFromEBPF() - - updateNodeResourceUtilizationMetrics(wg *sync.WaitGroup) - - updateProcessResourceUtilizationMetrics(wg *sync.WaitGroup) - - updateContainerResourceUtilizationMetrics() - - handleIdlingProcess(pStat *stats.ProcessStats) - - handleInactiveContainers(foundContainer map[string]bool) - - handleInactiveVM(foundVM map[string]bool) - - printDebugMetrics() - - createContainerStatsIfNotExist(containerID string, cGroupID uint64, pid uint64, withCGroupID bool) + - resetDeltaValue() + - updateResourceUtilizationMetrics() + - updateNodeAvgCPUFrequencyFromEBPF() + - updateNodeResourceUtilizationMetrics(wg *sync.WaitGroup) + - updateProcessResourceUtilizationMetrics(wg *sync.WaitGroup) + - updateContainerResourceUtilizationMetrics() + - handleIdlingProcess(pStat *stats.ProcessStats) + - handleInactiveContainers(foundContainer map[string]bool) + - handleInactiveVM(foundVM map[string]bool) + - printDebugMetrics() + - createContainerStatsIfNotExist(containerID string, cGroupID uint64, pid uint64, withCGroupID bool) + Initialize() error - + Destroy() - + Update() - + UpdateEnergyUtilizationMetrics() - + UpdateNodeEnergyUtilizationMetrics() - + UpdateProcessEnergyUtilizationMetrics() - + AggregateProcessResourceUtilizationMetrics() - + AggregateProcessEnergyUtilizationMetrics() + + Destroy() + + Update() + + UpdateEnergyUtilizationMetrics() + + UpdateNodeEnergyUtilizationMetrics() + + UpdateProcessEnergyUtilizationMetrics() + + AggregateProcessResourceUtilizationMetrics() + + AggregateProcessEnergyUtilizationMetrics() } } @@ -149,7 +149,7 @@ namespace components { + GetAbsEnergyFromUncore() (uint64, error) + GetAbsEnergyFromPackage() (uint64, error) + GetAbsEnergyFromNodeComponents() map[int]source.NodeComponentsEnergy - + StopPower() + + StopPower() + IsSystemCollectionSupported() bool } @@ -181,11 +181,11 @@ namespace container { + ContainerStats map[string]*stats.ContainerStats + Mx *sync.Mutex - - initMetrics() - - collectTotalEnergyMetrics(ch chan prometheus.Metric, container *stats.ContainerStats) + - initMetrics() + - collectTotalEnergyMetrics(ch chan prometheus.Metric, container *stats.ContainerStats) - + Describe(ch chan *prometheus.Desc) - + Collect(ch chan prometheus.Metric) + + Describe(ch chan *prometheus.Desc) + + Collect(ch chan prometheus.Metric) } } @@ -203,7 +203,7 @@ namespace gpu { + GetAbsEnergyFromGPU() []uint32 + GetProcessResourceUtilizationPerDevice(device interface{}, since time.Duration) (map[uint32]source.ProcessUtilizationSample, error) + IsGPUCollectionSupported() bool - + SetGPUCollectionSupported( bool) + + SetGPUCollectionSupported( bool) } } @@ -229,14 +229,14 @@ namespace kubernetes { + ResourceKind string + ContainerStats *map[string]*stats.ContainerStats - - handleUpdate(oldObj interface{}, newObj interface{}) - - handleAdd(obj interface{}) + - handleUpdate(oldObj interface{}, newObj interface{}) + - handleAdd(obj interface{}) - fillInfo(pod *v1.Pod, containers []v1.ContainerStatus) error - - handleDeleted(obj interface{}) - - deleteInfo(containers []v1.ContainerStatus) + - handleDeleted(obj interface{}) + - deleteInfo(containers []v1.ContainerStatus) - + Run() - + Stop() + + Run() + + Stop() } } @@ -278,16 +278,16 @@ namespace local { - loadWeightFromURLorLocal() (*ComponentModelWeights, error) - loadWeightFromLocal() ([]byte, error) - loadWeightFromURL() ([]byte, error) - - addFloatFeatureValues(x []float64) + - addFloatFeatureValues(x []float64) + Start() error + GetPlatformPower(isIdlePower bool) ([]float64, error) + GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error) + GetGPUPower(isIdlePower bool) ([]float64, error) - + AddProcessFeatureValues(x []float64) - + AddNodeFeatureValues(x []float64) - + AddDesiredOutValue(y float64) - + ResetSampleIdx() + + AddProcessFeatureValues(x []float64) + + AddNodeFeatureValues(x []float64) + + AddDesiredOutValue(y float64) + + ResetSampleIdx() + Train() error + IsEnabled() bool + GetModelType() types.ModelType @@ -328,10 +328,10 @@ namespace local { + GetPlatformPower(isIdlePower bool) ([]float64, error) + GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error) + GetGPUPower(isIdlePower bool) ([]float64, error) - + AddProcessFeatureValues(x []float64) - + AddNodeFeatureValues(x []float64) - + AddDesiredOutValue(y float64) - + ResetSampleIdx() + + AddProcessFeatureValues(x []float64) + + AddNodeFeatureValues(x []float64) + + AddDesiredOutValue(y float64) + + ResetSampleIdx() + Train() error + IsEnabled() bool + GetModelType() types.ModelType @@ -405,10 +405,10 @@ namespace metrics { + NodeStatsCollector prometheus.Collector + Mx sync.Mutex - + NewProcessCollector(processMetrics map[uint64]*stats.ProcessStats) - + NewContainerCollector(containerMetrics map[string]*stats.ContainerStats) - + NewVMCollector(vmMetrics map[string]*stats.VMStats) - + NewNodeCollector(nodeMetrics *stats.NodeStats) + + NewProcessCollector(processMetrics map[uint64]*stats.ProcessStats) + + NewContainerCollector(containerMetrics map[string]*stats.ContainerStats) + + NewVMCollector(vmMetrics map[string]*stats.VMStats) + + NewNodeCollector(nodeMetrics *stats.NodeStats) + RegisterMetrics() *prometheus.Registry } @@ -420,10 +420,10 @@ namespace metrics { namespace model { interface PowerModelInterface { - + AddProcessFeatureValues(x []float64) - + AddNodeFeatureValues(x []float64) - + AddDesiredOutValue(y float64) - + ResetSampleIdx() + + AddProcessFeatureValues(x []float64) + + AddNodeFeatureValues(x []float64) + + AddDesiredOutValue(y float64) + + ResetSampleIdx() + Train() error + IsEnabled() bool + GetModelType() types.ModelType @@ -446,10 +446,10 @@ namespace node { + NodeStats *stats.NodeStats + Mx *sync.Mutex - - initMetrics() + - initMetrics() - + Describe(ch chan *prometheus.Desc) - + Collect(ch chan prometheus.Metric) + + Describe(ch chan *prometheus.Desc) + + Collect(ch chan prometheus.Metric) } } @@ -478,14 +478,14 @@ namespace platform { class dummy << (S,Aquamarine) >> { + GetName() string + IsSystemCollectionSupported() bool - + StopPower() + + StopPower() + GetAbsEnergyFromPlatform() (map[string]float64, error) } interface powerInterface { + GetName() string + GetAbsEnergyFromPlatform() (map[string]float64, error) - + StopPower() + + StopPower() + IsSystemCollectionSupported() bool } @@ -502,10 +502,10 @@ namespace process { + ProcessStats map[uint64]*stats.ProcessStats + Mx *sync.Mutex - - initMetrics() + - initMetrics() - + Describe(ch chan *prometheus.Desc) - + Collect(ch chan prometheus.Metric) + + Describe(ch chan *prometheus.Desc) + + Collect(ch chan prometheus.Metric) } } @@ -521,7 +521,7 @@ namespace qat { + GetQATs() map[string]interface{} + GetQATUtilization(device map[string]interface{}) (map[string]source.DeviceUtilizationSample, error) + IsQATCollectionSupported() bool - + SetQATCollectionSupported( bool) + + SetQATCollectionSupported( bool) } } @@ -550,16 +550,16 @@ namespace sidecar { + SystemMetaDataFeatureValues []string - makeRequest(usageValues [][]float64, systemValues []string) (interface{}, error) - - addFloatFeatureValues(x []float64) + - addFloatFeatureValues(x []float64) + Start() error + GetPlatformPower(isIdlePower bool) ([]float64, error) + GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error) + GetGPUPower(isIdlePower bool) ([]float64, error) - + AddProcessFeatureValues(x []float64) - + AddNodeFeatureValues(x []float64) - + AddDesiredOutValue(y float64) - + ResetSampleIdx() + + AddProcessFeatureValues(x []float64) + + AddNodeFeatureValues(x []float64) + + AddDesiredOutValue(y float64) + + ResetSampleIdx() + Train() error + IsEnabled() bool + GetModelType() types.ModelType @@ -596,7 +596,7 @@ namespace source { + CollectEnergy bool + GetName() string - + StopPower() + + StopPower() + GetCPUCoreFrequency() map[int32]uint64 + IsSystemCollectionSupported() bool + IsHWMONCollectionSupported() bool @@ -617,7 +617,7 @@ namespace source { + GetAbsEnergyFromUncore() (uint64, error) + GetAbsEnergyFromPackage() (uint64, error) + GetAbsEnergyFromNodeComponents() map[int]NodeComponentsEnergy - + StopPower() + + StopPower() } class DeviceUtilizationSample << (S,Aquamarine) >> { @@ -643,7 +643,7 @@ namespace source { + GetGpus() []interface{} + GetProcessResourceUtilizationPerDevice(device interface{}, since time.Duration) (map[uint32]ProcessUtilizationSample, error) + IsGPUCollectionSupported() bool - + SetGPUCollectionSupported(supported bool) + + SetGPUCollectionSupported(supported bool) } class GPUNvml << (S,Aquamarine) >> { @@ -656,7 +656,7 @@ namespace source { + GetAbsEnergyFromGPU() []uint32 + GetProcessResourceUtilizationPerDevice(device interface{}, since time.Duration) (map[uint32]ProcessUtilizationSample, error) + IsGPUCollectionSupported() bool - + SetGPUCollectionSupported(supported bool) + + SetGPUCollectionSupported(supported bool) } class InputRanges << (S,Aquamarine) >> { @@ -693,7 +693,7 @@ namespace source { class PowerDummy << (S,Aquamarine) >> { + GetName() string + IsSystemCollectionSupported() bool - + StopPower() + + StopPower() + GetAbsEnergyFromDram() (uint64, error) + GetAbsEnergyFromCore() (uint64, error) + GetAbsEnergyFromUncore() (uint64, error) @@ -704,7 +704,7 @@ namespace source { class PowerEstimate << (S,Aquamarine) >> { + GetName() string + IsSystemCollectionSupported() bool - + StopPower() + + StopPower() + GetAbsEnergyFromDram() (uint64, error) + GetAbsEnergyFromCore() (uint64, error) + GetAbsEnergyFromUncore() (uint64, error) @@ -721,7 +721,7 @@ namespace source { } class PowerHMC << (S,Aquamarine) >> { + GetName() string - + StopPower() + + StopPower() + IsSystemCollectionSupported() bool + GetAbsEnergyFromPlatform() (map[string]float64, error) @@ -740,7 +740,7 @@ namespace source { + GetAbsEnergyFromUncore() (uint64, error) + GetAbsEnergyFromPackage() (uint64, error) + GetAbsEnergyFromNodeComponents() map[int]NodeComponentsEnergy - + StopPower() + + StopPower() } class PowerMetrics << (S,Aquamarine) >> { @@ -782,7 +782,7 @@ namespace source { + GetAbsEnergyFromUncore() (uint64, error) + GetAbsEnergyFromPackage() (uint64, error) + GetAbsEnergyFromNodeComponents() map[int]NodeComponentsEnergy - + StopPower() + + StopPower() + GetMaxEnergyRangeFromDram() (uint64, error) + GetMaxEnergyRangeFromCore() (uint64, error) + GetMaxEnergyRangeFromUncore() (uint64, error) @@ -807,7 +807,7 @@ namespace source { + Shutdown() bool + GetQATs() map[string]interface{} + IsQATCollectionSupported() bool - + SetQATCollectionSupported(supported bool) + + SetQATCollectionSupported(supported bool) } class RedFishClient << (S,Aquamarine) >> { @@ -820,7 +820,7 @@ namespace source { + GetName() string + IsSystemCollectionSupported() bool + GetAbsEnergyFromPlatform() (map[string]float64, error) - + StopPower() + + StopPower() } class RedfishAccessInfo << (S,Aquamarine) >> { @@ -940,8 +940,8 @@ namespace stats { + CgroupStatHandler cgroup.CCgroupStatHandler + CgroupStatMap map[string]*types.UInt64StatCollection - + ResetDeltaValues() - + SetLatestProcess(pid uint64) + + ResetDeltaValues() + + SetLatestProcess(pid uint64) + String() string + UpdateCgroupMetrics() error @@ -949,10 +949,10 @@ namespace stats { class NodeStats << (S,Aquamarine) >> { + IdleResUtilization map[string]uint64 - + ResetDeltaValues() - + UpdateIdleEnergyWithMinValue(isComponentsSystemCollectionSupported bool) - + CalcIdleEnergy(absM string, idleM string, resouceUtil string) - + SetNodeOtherComponentsEnergy() + + ResetDeltaValues() + + UpdateIdleEnergyWithMinValue(isComponentsSystemCollectionSupported bool) + + CalcIdleEnergy(absM string, idleM string, resouceUtil string) + + SetNodeOtherComponentsEnergy() + String() string } @@ -964,7 +964,7 @@ namespace stats { + Command string + IdleCounter int - + ResetDeltaValues() + + ResetDeltaValues() + String() string } @@ -972,10 +972,10 @@ namespace stats { + ResourceUsage map[string]*types.UInt64StatCollection + EnergyUsage map[string]*types.UInt64StatCollection - + ResetDeltaValues() + + ResetDeltaValues() + String() string - + UpdateDynEnergy() - + CalcDynEnergy(absM string, idleM string, dynM string, id string) + + UpdateDynEnergy() + + CalcDynEnergy(absM string, idleM string, dynM string, id string) + ToEstimatorValues(featuresName []string, shouldNormalize bool) []float64 } @@ -983,7 +983,7 @@ namespace stats { + PID uint64 + VMID string - + ResetDeltaValues() + + ResetDeltaValues() } } @@ -1026,7 +1026,7 @@ namespace types { + Delta uint64 + String() string - + ResetDeltaValues() + + ResetDeltaValues() + AddNewDelta(newDelta uint64) error + SetNewDelta(newDelta uint64) error + SetNewDeltaValue(newDelta uint64, sum bool) error @@ -1038,12 +1038,12 @@ namespace types { class UInt64StatCollection << (S,Aquamarine) >> { + Stat map[string]*UInt64Stat - + SetAggrStat(key string, newAggr uint64) - + AddDeltaStat(key string, newDelta uint64) - + SetDeltaStat(key string, newDelta uint64) + + SetAggrStat(key string, newAggr uint64) + + AddDeltaStat(key string, newDelta uint64) + + SetDeltaStat(key string, newDelta uint64) + SumAllDeltaValues() uint64 + SumAllAggrValues() uint64 - + ResetDeltaValues() + + ResetDeltaValues() + String() string } @@ -1066,10 +1066,10 @@ namespace virtualmachine { + VMStats map[string]*stats.VMStats + Mx *sync.Mutex - - initMetrics() + - initMetrics() - + Describe(ch chan *prometheus.Desc) - + Collect(ch chan prometheus.Metric) + + Describe(ch chan *prometheus.Desc) + + Collect(ch chan prometheus.Metric) } } diff --git a/doc/dev/umls/pkg/pkg.svg b/doc/dev/umls/pkg/pkg.svg index 673a40d9c7..973feff7a3 100644 --- a/doc/dev/umls/pkg/pkg.svg +++ b/doc/dev/umls/pkg/pkg.svg @@ -1 +1 @@ -attacherbccbpfbpfassetscgroupcollectorstatscomponentsconfigcontainersyncgpukubeletkuberneteslocalmodeltypesmanagermetricsmetricfactoryprometheusnodenodecredplatformprocessqatsidecarsourcevirtualmachinebuiltinBccModuleTablesModule *bcc.ModuleTable *bcc.TableTableName stringCPUFreqTable *bcc.TableProcessBPFMetricsCGroupID uint64ThreadPID uint64PID uint64ProcessRunTime uint64TaskClockTime uint64CPUCycles uint64CPUInstr uint64CacheMisses uint64PageCacheHit uint64VecNR []uint16Command []byteperfCounterenabled bool EvType intEvConfig intModuleTableProcessBPFMetricsattacher.ProcessBPFMetricsassetbytes []byteinfo os.FileInfobindataFileInfoname stringsize int64mode os.FileModemodTime time.TimeName() stringSize() int64Mode() os.FileModeModTime() time.TimeIsDir() boolSys()interface{}bintreeChildrenmap[string]*bintreeFuncfunc() (*asset, error)CCgroupStatHandlerSetCGroupStat(containerID string, CgroupStatMapmap[string]*types.UInt64StatCollection) errorCCgroupV1StatManagermanager cgroups.CgroupSetCGroupStat(containerID string, cgroupStatMapmap[string]*types.UInt64StatCollection) errorCCgroupV2StatManagermanager cgroups.ManagerSetCGroupStat(containerID string, cgroupStatMapmap[string]*types.UInt64StatCollection) errorContainerInfoContainerID stringContainerName stringPodName stringNamespace stringCollectorNodeStats stats.NodeStatsProcessStatsmap[uint64]*stats.ProcessStatsContainerStatsmap[string]*stats.ContainerStatsVMStatsmap[string]*stats.VMStatsresetDeltaValue()updateResourceUtilizationMetrics()updateNodeAvgCPUFrequencyFromEBPF()updateNodeResourceUtilizationMetrics(wg *sync.WaitGroup)updateProcessResourceUtilizationMetrics(wg *sync.WaitGroup)updateContainerResourceUtilizationMetrics()handleIdlingProcess(pStat *stats.ProcessStats)handleInactiveContainers(foundContainermap[string]bool)handleInactiveVM(foundVMmap[string]bool)printDebugMetrics()createContainerStatsIfNotExist(containerID string, cGroupID uint64, pid uint64, withCGroupID bool) Initialize() errorDestroy()Update()UpdateEnergyUtilizationMetrics()UpdateNodeEnergyUtilizationMetrics()UpdateProcessEnergyUtilizationMetrics()AggregateProcessResourceUtilizationMetrics()AggregateProcessEnergyUtilizationMetrics()ContainerStatsPIDSmap[uint64]boolContainerID stringContainerName stringPodName stringNamespace stringCgroupStatHandler cgroup.CCgroupStatHandlerCgroupStatMapmap[string]*types.UInt64StatCollectionResetDeltaValues()SetLatestProcess(pid uint64)String() stringUpdateCgroupMetrics() errorNodeStatsIdleResUtilizationmap[string]uint64ResetDeltaValues()UpdateIdleEnergyWithMinValue(isComponentsSystemCollectionSupported bool)CalcIdleEnergy(absM string, idleM string, resouceUtil string)SetNodeOtherComponentsEnergy()String() stringProcessStatsPID uint64CGroupID uint64ContainerID stringVMID stringCommand stringIdleCounter intResetDeltaValues()String() stringVMStatsPID uint64VMID stringResetDeltaValues()CPUModelDataCore stringUarch stringFamily stringModel stringStepping stringCPUScpusInfo []CPUModelDataStatsResourceUsagemap[string]*types.UInt64StatCollectionEnergyUsagemap[string]*types.UInt64StatCollectionResetDeltaValues()String() stringUpdateDynEnergy()CalcDynEnergy(absM string, idleM string, dynM string, id string)ToEstimatorValues(featuresName []string, shouldNormalize bool) []float64powerInterfaceGetName() stringGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]source.NodeComponentsEnergyStopPower()IsSystemCollectionSupported() boolClientgetUnixName() (unix.Utsname, error)getCgroupV2File() stringconfiggetUnixName() (unix.Utsname, error)getCgroupV2File() stringcollectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric ContainerStatsmap[string]*stats.ContainerStatsMx *sync.MutexinitMetrics()collectTotalEnergyMetrics(chchanprometheus.Metric, container *stats.ContainerStats) Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)MutexacceleratorInterfaceGetName() stringInit() errorShutdown() boolGetGpus() []interface{}GetAbsEnergyFromGPU() []uint32GetProcessResourceUtilizationPerDevice(deviceinterface{}, since time.Duration) (map[uint32]source.ProcessUtilizationSample, error)IsGPUCollectionSupported() boolSetGPUCollectionSupported( bool)KubeletPodListerListPods() (*[]v1.Pod, error)ObjListWatcherk8sCli *kubernetes.Clientsetinformer cache.SharedInformerstopChannelchan struct{} Mx *sync.MutexResourceKind stringContainerStats *map[string]*stats.ContainerStatshandleUpdate(oldObjinterface{}, newObjinterface{})handleAdd(objinterface{})fillInfo(pod *v1.Pod, containers []v1.ContainerStatus) errorhandleDeleted(objinterface{})deleteInfo(containers []v1.ContainerStatus) Run()Stop()AllWeightsBiasWeight float64CategoricalVariablesmap[string]map[string]CategoricalFeatureNumericalVariablesmap[string]NormalizedNumericalFeatureCategoricalFeatureWeight float64LinearRegressorfloatFeatureValues [][]float64floatFeatureValuesForIdlePower [][]float64xidx intenabled boolmodelWeight *ComponentModelWeights ModelServerEndpoint stringOutputType types.ModelOutputTypeEnergySource stringTrainerName stringSelectFilter stringModelWeightsURL stringModelWeightsFilepath stringFloatFeatureNames []stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringgetWeightFromServer() (*ComponentModelWeights, error)loadWeightFromURLorLocal() (*ComponentModelWeights, error)loadWeightFromLocal() ([]byte, error)loadWeightFromURL() ([]byte, error)addFloatFeatureValues(x []float64) Start() errorGetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)AddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringModelRequestMetricNames []stringOutputType stringEnergySource stringNodeType intWeight boolTrainerName stringSelectFilter stringModelWeightsgetIndexedWeights(usageMetrics []string, systemFeatures []string) ([]map[string]CategoricalFeature, []NormalizedNumericalFeature)predict(usageMetricNames []string, usageMetricValues [][]float64, systemMetaDataFeatureNames []string, systemMetaDataFeatureValues []string) []float64NormalizedNumericalFeatureScale float64Weight float64RatioPowerModelprocessFeatureValues [][]float64nodeFeatureValues []float64xidx int NodeFeatureNames []stringProcessFeatureNames []stringgetPowerByRatio(processIdx int, resUsageFeature int, nodePowerFeature int, numProcesses float64) float64 GetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)AddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringComponentFeaturesComponentModelWeightsPlaformFeaturesmap[string]ModelWeightsPowerModelInterfaceAddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringGetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)ModelOutputTypeString() stringUInt64StatCollectionStatmap[string]*UInt64StatSetAggrStat(key string, newAggr uint64)AddDeltaStat(key string, newDelta uint64)SetDeltaStat(key string, newDelta uint64)SumAllDeltaValues() uint64SumAllAggrValues() uint64ResetDeltaValues()String() stringModelConfigModelType ModelTypeModelOutputType ModelOutputTypeTrainerName stringEnergySource stringSelectFilter stringInitModelURL stringInitModelFilepath stringIsNodePowerModel boolProcessFeatureNames []stringNodeFeatureNames []stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringModelTypeString() stringUInt64StatAggr uint64Delta uint64String() stringResetDeltaValues()AddNewDelta(newDelta uint64) errorSetNewDelta(newDelta uint64) errorSetNewDeltaValue(newDelta uint64, sum bool) errorSetNewAggr(newAggr uint64) errorGetDelta() uint64GetAggr() uint64CollectorManagerStatsCollector *collector.CollectorPrometheusCollector *metrics.PrometheusExporterWatcher *kubernetes.ObjListWatcherStart() errorPrometheusExporterProcessStatsCollector prometheus.CollectorContainerStatsCollector prometheus.CollectorVMStatsCollector prometheus.CollectorNodeStatsCollector prometheus.CollectorMx sync.MutexNewProcessCollector(processMetricsmap[uint64]*stats.ProcessStats)NewContainerCollector(containerMetricsmap[string]*stats.ContainerStats)NewVMCollector(vmMetricsmap[string]*stats.VMStats)NewNodeCollector(nodeMetrics *stats.NodeStats)RegisterMetrics() *prometheus.RegistryPromMetricDesc() *prometheus.DescMustMetric(value float64, labelValues ...string) prometheus.MetricbpfGaugedesc *prometheus.DescDesc() *prometheus.DescMustMetric(value float64, labelValues ...string) prometheus.MetricpromCounterdesc *prometheus.DescDesc() *prometheus.DescMustMetric(value float64, labelValues ...string) prometheus.MetricCollectorcollectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric NodeStats *stats.NodeStatsMx *sync.MutexinitMetrics() Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)NodeCredInterfaceGetNodeCredByNodeName(nodeName string, target string) (map[string]string, error)IsSupported(infomap[string]string) boolcsvNodeCredGetNodeCredByNodeName(nodeName string, target string) (map[string]string, error)IsSupported(infomap[string]string) booldummyGetName() stringIsSystemCollectionSupported() boolStopPower()GetAbsEnergyFromPlatform() (map[string]float64, error)powerInterfaceGetName() stringGetAbsEnergyFromPlatform() (map[string]float64, error)StopPower()IsSystemCollectionSupported() boolcollectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric ProcessStatsmap[uint64]*stats.ProcessStatsMx *sync.MutexinitMetrics() Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)qatInterfaceInit() errorShutdown() boolGetQATs()map[string]interface{}GetQATUtilization(devicemap[string]interface{}) (map[string]source.DeviceUtilizationSample, error)IsQATCollectionSupported() boolSetQATCollectionSupported( bool)ComponentPowerResponsePowersmap[string][]float64Message stringEstimatorSidecarfloatFeatureValues [][]float64floatFeatureValuesForIdlePower [][]float64xidx intenabled bool Socket stringOutputType types.ModelOutputTypeEnergySource stringTrainerName stringSelectFilter stringFloatFeatureNames []stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringmakeRequest(usageValues [][]float64, systemValues []string) (interface{}, error)addFloatFeatureValues(x []float64) Start() errorGetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)AddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringPlatformPowerResponsePowers []float64Message stringPowerRequestFloatFeatureNames []stringUsageValues [][]float64OutputType stringEnergySource stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringTrainerName stringSelectFilter stringACPIpowerPath string CollectEnergy boolGetName() stringStopPower()GetCPUCoreFrequency()map[int32]uint64IsSystemCollectionSupported() boolIsHWMONCollectionSupported() boolGetAbsEnergyFromPlatform() (map[string]float64, error)ActionsPowerPowerSupplyReset PowerPowerSupplyResetApmXgeneSysfscurrTime time.TimeGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyStopPower()DeviceUtilizationSampleSampleCnt uint64PciTransCnt uint64Latency uint64BwIn uint64BwOut uint64CprUtil uint64DcprUtil uint64XltUtil uint64CphUtil uint64AthUtil uint64GPUDummycollectionSupported boolGetName() stringInit() errorShutdown() boolGetAbsEnergyFromGPU() []uint32GetGpus() []interface{}GetProcessResourceUtilizationPerDevice(deviceinterface{}, since time.Duration) (map[uint32]ProcessUtilizationSample, error)IsGPUCollectionSupported() boolSetGPUCollectionSupported(supported bool)GPUNvmlcollectionSupported boolGetName() stringInit() errorShutdown() boolGetGpus() []interface{}GetAbsEnergyFromGPU() []uint32GetProcessResourceUtilizationPerDevice(deviceinterface{}, since time.Duration) (map[uint32]ProcessUtilizationSample, error)IsGPUCollectionSupported() boolSetGPUCollectionSupported(supported bool)InputRangesInputType stringMinimumVoltage intMaximumVoltage intOutputWattage intNodeComponentsEnergyCore uint64DRAM uint64Uncore uint64Pkg uint64String() stringPowerControlOdataID stringMemberID stringName stringPowerConsumedWatts intPowerRequestedWatts intPowerAvailableWatts intPowerCapacityWatts intPowerAllocatedWatts intPowerMetrics PowerMetricsPowerLimit PowerLimitRelatedItem []RelatedItemStatus StatusPowerDummyGetName() stringIsSystemCollectionSupported() boolStopPower()GetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyPowerEstimateGetName() stringIsSystemCollectionSupported() boolStopPower()GetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyPowerEstimateDataArchitecture stringMinWatts float64MaxWatts float64PerGBWatts float64PowerHMCGetName() stringStopPower()IsSystemCollectionSupported() boolGetAbsEnergyFromPlatform() (map[string]float64, error)PowerLimitLimitInWatts intLimitException stringCorrectionInMs intPowerMSRGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyStopPower()PowerMetricsIntervalInMin intMinConsumedWatts intMaxConsumedWatts intAverageConsumedWatts intPowerPowerSupplyResetTarget stringPowerSuppliesOdataID stringMemberID stringName stringStatus StatusPowerSupplyType stringLineInputVoltageType stringLineInputVoltage intPowerCapacityWatts intLastPowerOutputWatts intModel stringManufacturer stringFirmwareVersion stringSerialNumber stringPartNumber stringSparePartNumber stringInputRanges []InputRangesRelatedItem []RelatedItemPowerSysfsGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyStopPower()GetMaxEnergyRangeFromDram() (uint64, error)GetMaxEnergyRangeFromCore() (uint64, error)GetMaxEnergyRangeFromUncore() (uint64, error)GetMaxEnergyRangeFromPackage() (uint64, error)ProcessUtilizationSamplePid uint32TimeStamp uint64SmUtil uint32MemUtil uint32EncUtil uint32DecUtil uint32QATTelemetrycollectionSupported boolGetName() stringInit() errorGetQATUtilization(devicesmap[string]interface{}) (map[string]DeviceUtilizationSample, error)Shutdown() boolGetQATs()map[string]interface{}IsQATCollectionSupported() boolSetQATCollectionSupported(supported bool)RedFishClientaccessInfo RedfishAccessInfosystems []*RedfishSystemPowerResultticker *time.TickerprobeInterval time.Durationmutex sync.MutexGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromPlatform() (map[string]float64, error)StopPower()RedfishAccessInfoUsername stringPassword stringHost stringRedfishPowerModelOdataType stringID stringName stringPowerControl []PowerControlVoltages []VoltagesPowerSupplies []PowerSuppliesActions ActionsOdataID stringRedfishSystemModelOdataContext stringOdataID stringOdataType stringDescription stringMembers []struct{string}MembersOdataCount intName stringRedfishSystemPowerResultsystem stringconsumedWatts inttimestamp time.TimeRelatedItemOdataID stringStatusState stringHealth stringVoltagesOdataID stringMemberID stringName stringSensorNumber intStatus StatusReadingVolts intUpperThresholdNonCritical float64UpperThresholdCritical intUpperThresholdFatal intLowerThresholdNonCritical float64LowerThresholdCritical intLowerThresholdFatal intMinReadingRange intMaxReadingRange intPhysicalContext stringRelatedItem []RelatedItemqatDevInfoaddr stringdatafile *os.Filecollectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric VMStatsmap[string]*stats.VMStatsMx *sync.MutexinitMetrics() Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)int \ No newline at end of file +attacherbccbpfbpfassetscgroupcollectorstatscomponentsconfigcontainersyncgpukubeletkuberneteslocalmodeltypesmanagermetricsmetricfactoryprometheusnodenodecredplatformprocessqatsidecarsourcevirtualmachinebuiltinBccModuleTablesModule *bcc.ModuleTable *bcc.TableTableName stringCPUFreqTable *bcc.TableProcessBPFMetricsCGroupID uint64ThreadPID uint64PID uint64ProcessRunTime uint64TaskClockTime uint64CPUCycles uint64CPUInstr uint64CacheMisses uint64PageCacheHit uint64VecNR []uint16Command []byteperfCounterenabled bool EvType intEvConfig intModuleTableProcessBPFMetricsattacher.ProcessBPFMetricsassetbytes []byteinfo os.FileInfobindataFileInfoname stringsize int64mode os.FileModemodTime time.TimeName() stringSize() int64Mode() os.FileModeModTime() time.TimeIsDir() boolSys()interface{}bintreeChildrenmap[string]*bintreeFuncfunc() (*asset, error)CCgroupStatHandlerSetCGroupStat(containerID string, CgroupStatMapmap[string]*types.UInt64StatCollection) errorCCgroupV1StatManagermanager cgroups.CgroupSetCGroupStat(containerID string, cgroupStatMapmap[string]*types.UInt64StatCollection) errorCCgroupV2StatManagermanager cgroups.ManagerSetCGroupStat(containerID string, cgroupStatMapmap[string]*types.UInt64StatCollection) errorContainerInfoContainerID stringContainerName stringPodName stringNamespace stringCollectorNodeStats stats.NodeStatsProcessStatsmap[uint64]*stats.ProcessStatsContainerStatsmap[string]*stats.ContainerStatsVMStatsmap[string]*stats.VMStatsresetDeltaValue()updateResourceUtilizationMetrics()updateNodeAvgCPUFrequencyFromEBPF()updateNodeResourceUtilizationMetrics(wg *sync.WaitGroup)updateProcessResourceUtilizationMetrics(wg *sync.WaitGroup)updateContainerResourceUtilizationMetrics()handleIdlingProcess(pStat *stats.ProcessStats)handleInactiveContainers(foundContainermap[string]bool)handleInactiveVM(foundVMmap[string]bool)printDebugMetrics()createContainerStatsIfNotExist(containerID string, cGroupID uint64, pid uint64, withCGroupID bool) Initialize() errorDestroy()Update()UpdateEnergyUtilizationMetrics()UpdateNodeEnergyUtilizationMetrics()UpdateProcessEnergyUtilizationMetrics()AggregateProcessResourceUtilizationMetrics()AggregateProcessEnergyUtilizationMetrics()ContainerStatsPIDSmap[uint64]boolContainerID stringContainerName stringPodName stringNamespace stringCgroupStatHandler cgroup.CCgroupStatHandlerCgroupStatMapmap[string]*types.UInt64StatCollectionResetDeltaValues()SetLatestProcess(pid uint64)String() stringUpdateCgroupMetrics() errorNodeStatsIdleResUtilizationmap[string]uint64ResetDeltaValues()UpdateIdleEnergyWithMinValue(isComponentsSystemCollectionSupported bool)CalcIdleEnergy(absM string, idleM string, resouceUtil string)SetNodeOtherComponentsEnergy()String() stringProcessStatsPID uint64CGroupID uint64ContainerID stringVMID stringCommand stringIdleCounter intResetDeltaValues()String() stringVMStatsPID uint64VMID stringResetDeltaValues()CPUModelDataCore stringUarch stringFamily stringModel stringStepping stringCPUScpusInfo []CPUModelDataStatsResourceUsagemap[string]*types.UInt64StatCollectionEnergyUsagemap[string]*types.UInt64StatCollectionResetDeltaValues()String() stringUpdateDynEnergy()CalcDynEnergy(absM string, idleM string, dynM string, id string)ToEstimatorValues(featuresName []string, shouldNormalize bool) []float64powerInterfaceGetName() stringGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]source.NodeComponentsEnergyStopPower()IsSystemCollectionSupported() boolClientgetUnixName() (unix.Utsname, error)getCgroupV2File() stringconfiggetUnixName() (unix.Utsname, error)getCgroupV2File() stringcollectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric ContainerStatsmap[string]*stats.ContainerStatsMx *sync.MutexinitMetrics()collectTotalEnergyMetrics(chchanprometheus.Metric, container *stats.ContainerStats) Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)MutexacceleratorInterfaceGetName() stringInit() errorShutdown() boolGetGpus() []interface{}GetAbsEnergyFromGPU() []uint32GetProcessResourceUtilizationPerDevice(deviceinterface{}, since time.Duration) (map[uint32]source.ProcessUtilizationSample, error)IsGPUCollectionSupported() boolSetGPUCollectionSupported( bool)KubeletPodListerListPods() (*[]v1.Pod, error)ObjListWatcherk8sCli *kubernetes.Clientsetinformer cache.SharedInformerstopChannelchan struct{} Mx *sync.MutexResourceKind stringContainerStats *map[string]*stats.ContainerStatshandleUpdate(oldObjinterface{}, newObjinterface{})handleAdd(objinterface{})fillInfo(pod *v1.Pod, containers []v1.ContainerStatus) errorhandleDeleted(objinterface{})deleteInfo(containers []v1.ContainerStatus) Run()Stop()AllWeightsBiasWeight float64CategoricalVariablesmap[string]map[string]CategoricalFeatureNumericalVariablesmap[string]NormalizedNumericalFeatureCategoricalFeatureWeight float64LinearRegressorfloatFeatureValues [][]float64floatFeatureValuesForIdlePower [][]float64xidx intenabled boolmodelWeight *ComponentModelWeights ModelServerEndpoint stringOutputType types.ModelOutputTypeEnergySource stringTrainerName stringSelectFilter stringModelWeightsURL stringModelWeightsFilepath stringFloatFeatureNames []stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringgetWeightFromServer() (*ComponentModelWeights, error)loadWeightFromURLorLocal() (*ComponentModelWeights, error)loadWeightFromLocal() ([]byte, error)loadWeightFromURL() ([]byte, error)addFloatFeatureValues(x []float64) Start() errorGetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)AddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringModelRequestMetricNames []stringOutputType stringEnergySource stringNodeType intWeight boolTrainerName stringSelectFilter stringModelWeightsgetIndexedWeights(usageMetrics []string, systemFeatures []string) ([]map[string]CategoricalFeature, []NormalizedNumericalFeature)predict(usageMetricNames []string, usageMetricValues [][]float64, systemMetaDataFeatureNames []string, systemMetaDataFeatureValues []string) []float64NormalizedNumericalFeatureScale float64Weight float64RatioPowerModelprocessFeatureValues [][]float64nodeFeatureValues []float64xidx int NodeFeatureNames []stringProcessFeatureNames []stringgetPowerByRatio(processIdx int, resUsageFeature int, nodePowerFeature int, numProcesses float64) float64 GetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)AddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringComponentFeaturesComponentModelWeightsPlaformFeaturesmap[string]ModelWeightsPowerModelInterfaceAddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringGetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)ModelOutputTypeString() stringUInt64StatCollectionStatmap[string]*UInt64StatSetAggrStat(key string, newAggr uint64)AddDeltaStat(key string, newDelta uint64)SetDeltaStat(key string, newDelta uint64)SumAllDeltaValues() uint64SumAllAggrValues() uint64ResetDeltaValues()String() stringModelConfigModelType ModelTypeModelOutputType ModelOutputTypeTrainerName stringEnergySource stringSelectFilter stringInitModelURL stringInitModelFilepath stringIsNodePowerModel boolProcessFeatureNames []stringNodeFeatureNames []stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringModelTypeString() stringUInt64StatAggr uint64Delta uint64String() stringResetDeltaValues()AddNewDelta(newDelta uint64) errorSetNewDelta(newDelta uint64) errorSetNewDeltaValue(newDelta uint64, sum bool) errorSetNewAggr(newAggr uint64) errorGetDelta() uint64GetAggr() uint64CollectorManagerStatsCollector *collector.CollectorPrometheusCollector *metrics.PrometheusExporterWatcher *kubernetes.ObjListWatcherStart() errorPrometheusExporterProcessStatsCollector prometheus.CollectorContainerStatsCollector prometheus.CollectorVMStatsCollector prometheus.CollectorNodeStatsCollector prometheus.CollectorMx sync.MutexNewProcessCollector(processMetricsmap[uint64]*stats.ProcessStats)NewContainerCollector(containerMetricsmap[string]*stats.ContainerStats)NewVMCollector(vmMetricsmap[string]*stats.VMStats)NewNodeCollector(nodeMetrics *stats.NodeStats)RegisterMetrics() *prometheus.RegistryPromMetricDesc() *prometheus.DescMustMetric(value float64, labelValues ...string) prometheus.MetricbpfGaugedesc *prometheus.DescDesc() *prometheus.DescMustMetric(value float64, labelValues ...string) prometheus.MetricpromCounterdesc *prometheus.DescDesc() *prometheus.DescMustMetric(value float64, labelValues ...string) prometheus.MetricCollectorcollectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric NodeStats *stats.NodeStatsMx *sync.MutexinitMetrics() Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)NodeCredInterfaceGetNodeCredByNodeName(nodeName string, target string) (map[string]string, error)IsSupported(infomap[string]string) boolcsvNodeCredGetNodeCredByNodeName(nodeName string, target string) (map[string]string, error)IsSupported(infomap[string]string) booldummyGetName() stringIsSystemCollectionSupported() boolStopPower()GetAbsEnergyFromPlatform() (map[string]float64, error)powerInterfaceGetName() stringGetAbsEnergyFromPlatform() (map[string]float64, error)StopPower()IsSystemCollectionSupported() boolcollectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric ProcessStatsmap[uint64]*stats.ProcessStatsMx *sync.MutexinitMetrics() Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)qatInterfaceInit() errorShutdown() boolGetQATs()map[string]interface{}GetQATUtilization(devicemap[string]interface{}) (map[string]source.DeviceUtilizationSample, error)IsQATCollectionSupported() boolSetQATCollectionSupported( bool)ComponentPowerResponsePowersmap[string][]float64Message stringEstimatorSidecarfloatFeatureValues [][]float64floatFeatureValuesForIdlePower [][]float64xidx intenabled bool Socket stringOutputType types.ModelOutputTypeEnergySource stringTrainerName stringSelectFilter stringFloatFeatureNames []stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringmakeRequest(usageValues [][]float64, systemValues []string) (interface{}, error)addFloatFeatureValues(x []float64) Start() errorGetPlatformPower(isIdlePower bool) ([]float64, error)GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)GetGPUPower(isIdlePower bool) ([]float64, error)AddProcessFeatureValues(x []float64)AddNodeFeatureValues(x []float64)AddDesiredOutValue(y float64)ResetSampleIdx()Train() errorIsEnabled() boolGetModelType() types.ModelTypeGetProcessFeatureNamesList() []stringGetNodeFeatureNamesList() []stringPlatformPowerResponsePowers []float64Message stringPowerRequestFloatFeatureNames []stringUsageValues [][]float64OutputType stringEnergySource stringSystemMetaDataFeatureNames []stringSystemMetaDataFeatureValues []stringTrainerName stringSelectFilter stringACPIpowerPath string CollectEnergy boolGetName() stringStopPower()GetCPUCoreFrequency()map[int32]uint64IsSystemCollectionSupported() boolIsHWMONCollectionSupported() boolGetAbsEnergyFromPlatform() (map[string]float64, error)ActionsPowerPowerSupplyReset PowerPowerSupplyResetApmXgeneSysfscurrTime time.TimeGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyStopPower()DeviceUtilizationSampleSampleCnt uint64PciTransCnt uint64Latency uint64BwIn uint64BwOut uint64CprUtil uint64DcprUtil uint64XltUtil uint64CphUtil uint64AthUtil uint64GPUDummycollectionSupported boolGetName() stringInit() errorShutdown() boolGetAbsEnergyFromGPU() []uint32GetGpus() []interface{}GetProcessResourceUtilizationPerDevice(deviceinterface{}, since time.Duration) (map[uint32]ProcessUtilizationSample, error)IsGPUCollectionSupported() boolSetGPUCollectionSupported(supported bool)GPUNvmlcollectionSupported boolGetName() stringInit() errorShutdown() boolGetGpus() []interface{}GetAbsEnergyFromGPU() []uint32GetProcessResourceUtilizationPerDevice(deviceinterface{}, since time.Duration) (map[uint32]ProcessUtilizationSample, error)IsGPUCollectionSupported() boolSetGPUCollectionSupported(supported bool)InputRangesInputType stringMinimumVoltage intMaximumVoltage intOutputWattage intNodeComponentsEnergyCore uint64DRAM uint64Uncore uint64Pkg uint64String() stringPowerControlOdataID stringMemberID stringName stringPowerConsumedWatts intPowerRequestedWatts intPowerAvailableWatts intPowerCapacityWatts intPowerAllocatedWatts intPowerMetrics PowerMetricsPowerLimit PowerLimitRelatedItem []RelatedItemStatus StatusPowerDummyGetName() stringIsSystemCollectionSupported() boolStopPower()GetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyPowerEstimateGetName() stringIsSystemCollectionSupported() boolStopPower()GetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyPowerEstimateDataArchitecture stringMinWatts float64MaxWatts float64PerGBWatts float64PowerHMCGetName() stringStopPower()IsSystemCollectionSupported() boolGetAbsEnergyFromPlatform() (map[string]float64, error)PowerLimitLimitInWatts intLimitException stringCorrectionInMs intPowerMSRGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyStopPower()PowerMetricsIntervalInMin intMinConsumedWatts intMaxConsumedWatts intAverageConsumedWatts intPowerPowerSupplyResetTarget stringPowerSuppliesOdataID stringMemberID stringName stringStatus StatusPowerSupplyType stringLineInputVoltageType stringLineInputVoltage intPowerCapacityWatts intLastPowerOutputWatts intModel stringManufacturer stringFirmwareVersion stringSerialNumber stringPartNumber stringSparePartNumber stringInputRanges []InputRangesRelatedItem []RelatedItemPowerSysfsGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyStopPower()GetMaxEnergyRangeFromDram() (uint64, error)GetMaxEnergyRangeFromCore() (uint64, error)GetMaxEnergyRangeFromUncore() (uint64, error)GetMaxEnergyRangeFromPackage() (uint64, error)ProcessUtilizationSamplePid uint32TimeStamp uint64SmUtil uint32MemUtil uint32EncUtil uint32DecUtil uint32QATTelemetrycollectionSupported boolGetName() stringInit() errorGetQATUtilization(devicesmap[string]interface{}) (map[string]DeviceUtilizationSample, error)Shutdown() boolGetQATs()map[string]interface{}IsQATCollectionSupported() boolSetQATCollectionSupported(supported bool)RedFishClientaccessInfo RedfishAccessInfosystems []*RedfishSystemPowerResultticker *time.TickerprobeInterval time.Durationmutex sync.MutexGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromPlatform() (map[string]float64, error)StopPower()RedfishAccessInfoUsername stringPassword stringHost stringRedfishPowerModelOdataType stringID stringName stringPowerControl []PowerControlVoltages []VoltagesPowerSupplies []PowerSuppliesActions ActionsOdataID stringRedfishSystemModelOdataContext stringOdataID stringOdataType stringDescription stringMembers []struct{string}MembersOdataCount intName stringRedfishSystemPowerResultsystem stringconsumedWatts inttimestamp time.TimeRelatedItemOdataID stringStatusState stringHealth stringVoltagesOdataID stringMemberID stringName stringSensorNumber intStatus StatusReadingVolts intUpperThresholdNonCritical float64UpperThresholdCritical intUpperThresholdFatal intLowerThresholdNonCritical float64LowerThresholdCritical intLowerThresholdFatal intMinReadingRange intMaxReadingRange intPhysicalContext stringRelatedItem []RelatedItemqatDevInfoaddr stringdatafile *os.Filecollectordescriptionsmap[string]*prometheus.Desccollectorsmap[string]metricfactory.PromMetric VMStatsmap[string]*stats.VMStatsMx *sync.MutexinitMetrics() Describe(chchan*prometheus.Desc)Collect(chchanprometheus.Metric)int diff --git a/doc/dev/umls/pkg/sensors/sensors.plantuml b/doc/dev/umls/pkg/sensors/sensors.plantuml index b6f2434707..fae4b9dba6 100644 --- a/doc/dev/umls/pkg/sensors/sensors.plantuml +++ b/doc/dev/umls/pkg/sensors/sensors.plantuml @@ -7,7 +7,7 @@ namespace components { + GetAbsEnergyFromUncore() (uint64, error) + GetAbsEnergyFromPackage() (uint64, error) + GetAbsEnergyFromNodeComponents() map[int]source.NodeComponentsEnergy - + StopPower() + + StopPower() + IsSystemCollectionSupported() bool } @@ -24,7 +24,7 @@ namespace gpu { + GetAbsEnergyFromGPU() []uint32 + GetProcessResourceUtilizationPerDevice(device interface{}, since time.Duration) (map[uint32]source.ProcessUtilizationSample, error) + IsGPUCollectionSupported() bool - + SetGPUCollectionSupported( bool) + + SetGPUCollectionSupported( bool) } } @@ -35,14 +35,14 @@ namespace platform { class dummy << (S,Aquamarine) >> { + GetName() string + IsSystemCollectionSupported() bool - + StopPower() + + StopPower() + GetAbsEnergyFromPlatform() (map[string]float64, error) } interface powerInterface { + GetName() string + GetAbsEnergyFromPlatform() (map[string]float64, error) - + StopPower() + + StopPower() + IsSystemCollectionSupported() bool } @@ -58,7 +58,7 @@ namespace qat { + GetQATs() map[string]interface{} + GetQATUtilization(device map[string]interface{}) (map[string]source.DeviceUtilizationSample, error) + IsQATCollectionSupported() bool - + SetQATCollectionSupported( bool) + + SetQATCollectionSupported( bool) } } @@ -72,7 +72,7 @@ namespace source { + CollectEnergy bool + GetName() string - + StopPower() + + StopPower() + GetCPUCoreFrequency() map[int32]uint64 + IsSystemCollectionSupported() bool + IsHWMONCollectionSupported() bool @@ -93,7 +93,7 @@ namespace source { + GetAbsEnergyFromUncore() (uint64, error) + GetAbsEnergyFromPackage() (uint64, error) + GetAbsEnergyFromNodeComponents() map[int]NodeComponentsEnergy - + StopPower() + + StopPower() } class DeviceUtilizationSample << (S,Aquamarine) >> { @@ -119,7 +119,7 @@ namespace source { + GetGpus() []interface{} + GetProcessResourceUtilizationPerDevice(device interface{}, since time.Duration) (map[uint32]ProcessUtilizationSample, error) + IsGPUCollectionSupported() bool - + SetGPUCollectionSupported(supported bool) + + SetGPUCollectionSupported(supported bool) } class GPUNvml << (S,Aquamarine) >> { @@ -132,7 +132,7 @@ namespace source { + GetAbsEnergyFromGPU() []uint32 + GetProcessResourceUtilizationPerDevice(device interface{}, since time.Duration) (map[uint32]ProcessUtilizationSample, error) + IsGPUCollectionSupported() bool - + SetGPUCollectionSupported(supported bool) + + SetGPUCollectionSupported(supported bool) } class InputRanges << (S,Aquamarine) >> { @@ -169,7 +169,7 @@ namespace source { class PowerDummy << (S,Aquamarine) >> { + GetName() string + IsSystemCollectionSupported() bool - + StopPower() + + StopPower() + GetAbsEnergyFromDram() (uint64, error) + GetAbsEnergyFromCore() (uint64, error) + GetAbsEnergyFromUncore() (uint64, error) @@ -180,7 +180,7 @@ namespace source { class PowerEstimate << (S,Aquamarine) >> { + GetName() string + IsSystemCollectionSupported() bool - + StopPower() + + StopPower() + GetAbsEnergyFromDram() (uint64, error) + GetAbsEnergyFromCore() (uint64, error) + GetAbsEnergyFromUncore() (uint64, error) @@ -197,7 +197,7 @@ namespace source { } class PowerHMC << (S,Aquamarine) >> { + GetName() string - + StopPower() + + StopPower() + IsSystemCollectionSupported() bool + GetAbsEnergyFromPlatform() (map[string]float64, error) @@ -216,7 +216,7 @@ namespace source { + GetAbsEnergyFromUncore() (uint64, error) + GetAbsEnergyFromPackage() (uint64, error) + GetAbsEnergyFromNodeComponents() map[int]NodeComponentsEnergy - + StopPower() + + StopPower() } class PowerMetrics << (S,Aquamarine) >> { @@ -258,7 +258,7 @@ namespace source { + GetAbsEnergyFromUncore() (uint64, error) + GetAbsEnergyFromPackage() (uint64, error) + GetAbsEnergyFromNodeComponents() map[int]NodeComponentsEnergy - + StopPower() + + StopPower() + GetMaxEnergyRangeFromDram() (uint64, error) + GetMaxEnergyRangeFromCore() (uint64, error) + GetMaxEnergyRangeFromUncore() (uint64, error) @@ -283,7 +283,7 @@ namespace source { + Shutdown() bool + GetQATs() map[string]interface{} + IsQATCollectionSupported() bool - + SetQATCollectionSupported(supported bool) + + SetQATCollectionSupported(supported bool) } class RedFishClient << (S,Aquamarine) >> { @@ -296,7 +296,7 @@ namespace source { + GetName() string + IsSystemCollectionSupported() bool + GetAbsEnergyFromPlatform() (map[string]float64, error) - + StopPower() + + StopPower() } class RedfishAccessInfo << (S,Aquamarine) >> { diff --git a/doc/dev/umls/pkg/sensors/sensors.svg b/doc/dev/umls/pkg/sensors/sensors.svg index 806b3da904..b13ffcf916 100644 --- a/doc/dev/umls/pkg/sensors/sensors.svg +++ b/doc/dev/umls/pkg/sensors/sensors.svg @@ -1 +1 @@ -componentsgpuplatformqatsourcepowerInterfaceGetName() stringGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]source.NodeComponentsEnergyStopPower()IsSystemCollectionSupported() boolacceleratorInterfaceGetName() stringInit() errorShutdown() boolGetGpus() []interface{}GetAbsEnergyFromGPU() []uint32GetProcessResourceUtilizationPerDevice(deviceinterface{}, since time.Duration) (map[uint32]source.ProcessUtilizationSample, error)IsGPUCollectionSupported() boolSetGPUCollectionSupported( bool)dummyGetName() stringIsSystemCollectionSupported() boolStopPower()GetAbsEnergyFromPlatform() (map[string]float64, error)powerInterfaceGetName() stringGetAbsEnergyFromPlatform() (map[string]float64, error)StopPower()IsSystemCollectionSupported() boolqatInterfaceInit() errorShutdown() boolGetQATs()map[string]interface{}GetQATUtilization(devicemap[string]interface{}) (map[string]source.DeviceUtilizationSample, error)IsQATCollectionSupported() boolSetQATCollectionSupported( bool)ACPIpowerPath string CollectEnergy boolGetName() stringStopPower()GetCPUCoreFrequency()map[int32]uint64IsSystemCollectionSupported() boolIsHWMONCollectionSupported() boolGetAbsEnergyFromPlatform() (map[string]float64, error)ActionsPowerPowerSupplyReset PowerPowerSupplyResetApmXgeneSysfscurrTime time.TimeGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyStopPower()DeviceUtilizationSampleSampleCnt uint64PciTransCnt uint64Latency uint64BwIn uint64BwOut uint64CprUtil uint64DcprUtil uint64XltUtil uint64CphUtil uint64AthUtil uint64GPUDummycollectionSupported boolGetName() stringInit() errorShutdown() boolGetAbsEnergyFromGPU() []uint32GetGpus() []interface{}GetProcessResourceUtilizationPerDevice(deviceinterface{}, since time.Duration) (map[uint32]ProcessUtilizationSample, error)IsGPUCollectionSupported() boolSetGPUCollectionSupported(supported bool)GPUNvmlcollectionSupported boolGetName() stringInit() errorShutdown() boolGetGpus() []interface{}GetAbsEnergyFromGPU() []uint32GetProcessResourceUtilizationPerDevice(deviceinterface{}, since time.Duration) (map[uint32]ProcessUtilizationSample, error)IsGPUCollectionSupported() boolSetGPUCollectionSupported(supported bool)InputRangesInputType stringMinimumVoltage intMaximumVoltage intOutputWattage intNodeComponentsEnergyCore uint64DRAM uint64Uncore uint64Pkg uint64String() stringPowerControlOdataID stringMemberID stringName stringPowerConsumedWatts intPowerRequestedWatts intPowerAvailableWatts intPowerCapacityWatts intPowerAllocatedWatts intPowerMetrics PowerMetricsPowerLimit PowerLimitRelatedItem []RelatedItemStatus StatusPowerDummyGetName() stringIsSystemCollectionSupported() boolStopPower()GetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyPowerEstimateGetName() stringIsSystemCollectionSupported() boolStopPower()GetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyPowerEstimateDataArchitecture stringMinWatts float64MaxWatts float64PerGBWatts float64PowerHMCGetName() stringStopPower()IsSystemCollectionSupported() boolGetAbsEnergyFromPlatform() (map[string]float64, error)PowerLimitLimitInWatts intLimitException stringCorrectionInMs intPowerMSRGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyStopPower()PowerMetricsIntervalInMin intMinConsumedWatts intMaxConsumedWatts intAverageConsumedWatts intPowerPowerSupplyResetTarget stringPowerSuppliesOdataID stringMemberID stringName stringStatus StatusPowerSupplyType stringLineInputVoltageType stringLineInputVoltage intPowerCapacityWatts intLastPowerOutputWatts intModel stringManufacturer stringFirmwareVersion stringSerialNumber stringPartNumber stringSparePartNumber stringInputRanges []InputRangesRelatedItem []RelatedItemPowerSysfsGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyStopPower()GetMaxEnergyRangeFromDram() (uint64, error)GetMaxEnergyRangeFromCore() (uint64, error)GetMaxEnergyRangeFromUncore() (uint64, error)GetMaxEnergyRangeFromPackage() (uint64, error)ProcessUtilizationSamplePid uint32TimeStamp uint64SmUtil uint32MemUtil uint32EncUtil uint32DecUtil uint32QATTelemetrycollectionSupported boolGetName() stringInit() errorGetQATUtilization(devicesmap[string]interface{}) (map[string]DeviceUtilizationSample, error)Shutdown() boolGetQATs()map[string]interface{}IsQATCollectionSupported() boolSetQATCollectionSupported(supported bool)RedFishClientaccessInfo RedfishAccessInfosystems []*RedfishSystemPowerResultticker *time.TickerprobeInterval time.Durationmutex sync.MutexGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromPlatform() (map[string]float64, error)StopPower()RedfishAccessInfoUsername stringPassword stringHost stringRedfishPowerModelOdataType stringID stringName stringPowerControl []PowerControlVoltages []VoltagesPowerSupplies []PowerSuppliesActions ActionsOdataID stringRedfishSystemModelOdataContext stringOdataID stringOdataType stringDescription stringMembers []struct{string}MembersOdataCount intName stringRedfishSystemPowerResultsystem stringconsumedWatts inttimestamp time.TimeRelatedItemOdataID stringStatusState stringHealth stringVoltagesOdataID stringMemberID stringName stringSensorNumber intStatus StatusReadingVolts intUpperThresholdNonCritical float64UpperThresholdCritical intUpperThresholdFatal intLowerThresholdNonCritical float64LowerThresholdCritical intLowerThresholdFatal intMinReadingRange intMaxReadingRange intPhysicalContext stringRelatedItem []RelatedItemqatDevInfoaddr stringdatafile *os.File \ No newline at end of file +componentsgpuplatformqatsourcepowerInterfaceGetName() stringGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]source.NodeComponentsEnergyStopPower()IsSystemCollectionSupported() boolacceleratorInterfaceGetName() stringInit() errorShutdown() boolGetGpus() []interface{}GetAbsEnergyFromGPU() []uint32GetProcessResourceUtilizationPerDevice(deviceinterface{}, since time.Duration) (map[uint32]source.ProcessUtilizationSample, error)IsGPUCollectionSupported() boolSetGPUCollectionSupported( bool)dummyGetName() stringIsSystemCollectionSupported() boolStopPower()GetAbsEnergyFromPlatform() (map[string]float64, error)powerInterfaceGetName() stringGetAbsEnergyFromPlatform() (map[string]float64, error)StopPower()IsSystemCollectionSupported() boolqatInterfaceInit() errorShutdown() boolGetQATs()map[string]interface{}GetQATUtilization(devicemap[string]interface{}) (map[string]source.DeviceUtilizationSample, error)IsQATCollectionSupported() boolSetQATCollectionSupported( bool)ACPIpowerPath string CollectEnergy boolGetName() stringStopPower()GetCPUCoreFrequency()map[int32]uint64IsSystemCollectionSupported() boolIsHWMONCollectionSupported() boolGetAbsEnergyFromPlatform() (map[string]float64, error)ActionsPowerPowerSupplyReset PowerPowerSupplyResetApmXgeneSysfscurrTime time.TimeGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyStopPower()DeviceUtilizationSampleSampleCnt uint64PciTransCnt uint64Latency uint64BwIn uint64BwOut uint64CprUtil uint64DcprUtil uint64XltUtil uint64CphUtil uint64AthUtil uint64GPUDummycollectionSupported boolGetName() stringInit() errorShutdown() boolGetAbsEnergyFromGPU() []uint32GetGpus() []interface{}GetProcessResourceUtilizationPerDevice(deviceinterface{}, since time.Duration) (map[uint32]ProcessUtilizationSample, error)IsGPUCollectionSupported() boolSetGPUCollectionSupported(supported bool)GPUNvmlcollectionSupported boolGetName() stringInit() errorShutdown() boolGetGpus() []interface{}GetAbsEnergyFromGPU() []uint32GetProcessResourceUtilizationPerDevice(deviceinterface{}, since time.Duration) (map[uint32]ProcessUtilizationSample, error)IsGPUCollectionSupported() boolSetGPUCollectionSupported(supported bool)InputRangesInputType stringMinimumVoltage intMaximumVoltage intOutputWattage intNodeComponentsEnergyCore uint64DRAM uint64Uncore uint64Pkg uint64String() stringPowerControlOdataID stringMemberID stringName stringPowerConsumedWatts intPowerRequestedWatts intPowerAvailableWatts intPowerCapacityWatts intPowerAllocatedWatts intPowerMetrics PowerMetricsPowerLimit PowerLimitRelatedItem []RelatedItemStatus StatusPowerDummyGetName() stringIsSystemCollectionSupported() boolStopPower()GetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyPowerEstimateGetName() stringIsSystemCollectionSupported() boolStopPower()GetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyPowerEstimateDataArchitecture stringMinWatts float64MaxWatts float64PerGBWatts float64PowerHMCGetName() stringStopPower()IsSystemCollectionSupported() boolGetAbsEnergyFromPlatform() (map[string]float64, error)PowerLimitLimitInWatts intLimitException stringCorrectionInMs intPowerMSRGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyStopPower()PowerMetricsIntervalInMin intMinConsumedWatts intMaxConsumedWatts intAverageConsumedWatts intPowerPowerSupplyResetTarget stringPowerSuppliesOdataID stringMemberID stringName stringStatus StatusPowerSupplyType stringLineInputVoltageType stringLineInputVoltage intPowerCapacityWatts intLastPowerOutputWatts intModel stringManufacturer stringFirmwareVersion stringSerialNumber stringPartNumber stringSparePartNumber stringInputRanges []InputRangesRelatedItem []RelatedItemPowerSysfsGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromDram() (uint64, error)GetAbsEnergyFromCore() (uint64, error)GetAbsEnergyFromUncore() (uint64, error)GetAbsEnergyFromPackage() (uint64, error)GetAbsEnergyFromNodeComponents()map[int]NodeComponentsEnergyStopPower()GetMaxEnergyRangeFromDram() (uint64, error)GetMaxEnergyRangeFromCore() (uint64, error)GetMaxEnergyRangeFromUncore() (uint64, error)GetMaxEnergyRangeFromPackage() (uint64, error)ProcessUtilizationSamplePid uint32TimeStamp uint64SmUtil uint32MemUtil uint32EncUtil uint32DecUtil uint32QATTelemetrycollectionSupported boolGetName() stringInit() errorGetQATUtilization(devicesmap[string]interface{}) (map[string]DeviceUtilizationSample, error)Shutdown() boolGetQATs()map[string]interface{}IsQATCollectionSupported() boolSetQATCollectionSupported(supported bool)RedFishClientaccessInfo RedfishAccessInfosystems []*RedfishSystemPowerResultticker *time.TickerprobeInterval time.Durationmutex sync.MutexGetName() stringIsSystemCollectionSupported() boolGetAbsEnergyFromPlatform() (map[string]float64, error)StopPower()RedfishAccessInfoUsername stringPassword stringHost stringRedfishPowerModelOdataType stringID stringName stringPowerControl []PowerControlVoltages []VoltagesPowerSupplies []PowerSuppliesActions ActionsOdataID stringRedfishSystemModelOdataContext stringOdataID stringOdataType stringDescription stringMembers []struct{string}MembersOdataCount intName stringRedfishSystemPowerResultsystem stringconsumedWatts inttimestamp time.TimeRelatedItemOdataID stringStatusState stringHealth stringVoltagesOdataID stringMemberID stringName stringSensorNumber intStatus StatusReadingVolts intUpperThresholdNonCritical float64UpperThresholdCritical intUpperThresholdFatal intLowerThresholdNonCritical float64LowerThresholdCritical intLowerThresholdFatal intMinReadingRange intMaxReadingRange intPhysicalContext stringRelatedItem []RelatedItemqatDevInfoaddr stringdatafile *os.File diff --git a/doc/dev/umls/pkg/utils/utils.svg b/doc/dev/umls/pkg/utils/utils.svg index e65693b39a..5b785edea9 100644 --- a/doc/dev/umls/pkg/utils/utils.svg +++ b/doc/dev/umls/pkg/utils/utils.svg @@ -1 +1 @@ -Welcome to PlantUML! You can start with a simple UML Diagram like: Bob->Alice: Hello Or class Example You will find more information about PlantUML syntax onhttps://plantuml.com (Details by typinglicensekeyword)      \ No newline at end of file +Welcome to PlantUML! You can start with a simple UML Diagram like: Bob->Alice: Hello Or class Example You will find more information about PlantUML syntax onhttps://plantuml.com (Details by typinglicensekeyword)      diff --git a/doc/dev/umls/pkg/version/version.svg b/doc/dev/umls/pkg/version/version.svg index e65693b39a..5b785edea9 100644 --- a/doc/dev/umls/pkg/version/version.svg +++ b/doc/dev/umls/pkg/version/version.svg @@ -1 +1 @@ -Welcome to PlantUML! You can start with a simple UML Diagram like: Bob->Alice: Hello Or class Example You will find more information about PlantUML syntax onhttps://plantuml.com (Details by typinglicensekeyword)      \ No newline at end of file +Welcome to PlantUML! You can start with a simple UML Diagram like: Bob->Alice: Hello Or class Example You will find more information about PlantUML syntax onhttps://plantuml.com (Details by typinglicensekeyword)      diff --git a/e2e/tools/validator/README.md b/e2e/tools/validator/README.md index 0f49e6fff3..221ef5b900 100644 --- a/e2e/tools/validator/README.md +++ b/e2e/tools/validator/README.md @@ -24,16 +24,15 @@ pip install . ## Usage -Configure Prometheus jobs. The one to scrape the metal metrics is assumed to be named `metal` and the one to scrape the +Configure Prometheus jobs. The one to scrape the metal metrics is assumed to be named `metal` and the one to scrape the VM metrics is assumed to be named `vm`. Generate the validator.yaml file based on [validator.yaml.sample](validator.yaml.sample) and run the following command: ```console -python -m validator stress -s ./scripts/stressor.sh +python -m validator stress -s ./scripts/stressor.sh ``` ## License `validator` is distributed under the terms of the [Apache 2.0](http://www.apache.org/licenses/) license. - diff --git a/e2e/tools/validator/scripts/stressor.sh b/e2e/tools/validator/scripts/stressor.sh index 6cb2037f6a..8af25b35a5 100755 --- a/e2e/tools/validator/scripts/stressor.sh +++ b/e2e/tools/validator/scripts/stressor.sh @@ -28,4 +28,3 @@ stress-ng --cpu $(nproc) --cpu-load 75 --timeout 20s # cool off for 40 seconds # idle stress-ng --cpu $(nproc) --cpu-load 0 --timeout 10s - diff --git a/e2e/tools/validator/src/validator/cases/__init__.py b/e2e/tools/validator/src/validator/cases/__init__.py index 9e8b3b8012..8264924b5a 100644 --- a/e2e/tools/validator/src/validator/cases/__init__.py +++ b/e2e/tools/validator/src/validator/cases/__init__.py @@ -48,7 +48,7 @@ def __init__(self, metal_job_name: str, vm_job_name: str, vm: config.VM, prom: c else: self.query = f"vm_id=~'.*{{vm_name}}'".format(vm_name=self.vm_name) self.level = "vm" - + def load_test_cases(self) -> CasesResult: test_cases = [] for raw_prom_query in self.raw_prom_queries: @@ -60,4 +60,4 @@ def load_test_cases(self) -> CasesResult: )) return CasesResult( test_cases=test_cases - ) \ No newline at end of file + ) diff --git a/e2e/tools/validator/src/validator/cli/__init__.py b/e2e/tools/validator/src/validator/cli/__init__.py index 055ed18fbf..724300f0f2 100644 --- a/e2e/tools/validator/src/validator/cli/__init__.py +++ b/e2e/tools/validator/src/validator/cli/__init__.py @@ -22,7 +22,7 @@ pass_config = click.make_pass_decorator(Validator) @click.group( - context_settings={"help_option_names": ["-h", "--help"]}, + context_settings={"help_option_names": ["-h", "--help"]}, invoke_without_command=False, ) @click.version_option(version=__version__, prog_name="validator") @@ -37,8 +37,8 @@ def validator(ctx: click.Context, config_file: str): @validator.command() @click.option( - "--script-path", "-s", - default="scripts/stressor.sh", + "--script-path", "-s", + default="scripts/stressor.sh", type=str, ) @pass_config @@ -92,14 +92,14 @@ def stress(cfg: Validator, script_path: str): query = test_case.refined_query print(f"start_time: {result.start_time}, end_time: {result.end_time} query: {query}") - metrics_res = metrics_validator.compare_metrics(result.start_time, - result.end_time, + metrics_res = metrics_validator.compare_metrics(result.start_time, + result.end_time, query) click.secho(f"Query Name: {query}", fg='bright_white') click.secho(f"Error List: {metrics_res.el}", fg='bright_red') - click.secho(f"Average Error: {metrics_res.me}", fg='bright_yellow') - + click.secho(f"Average Error: {metrics_res.me}", fg='bright_yellow') + click.secho("---------------------------------------------------", fg="cyan") report.write("#### Query\n") report.write(f"```{query}```\n") @@ -110,5 +110,3 @@ def stress(cfg: Validator, script_path: str): report.write("\n") report.flush() report.close() - - diff --git a/e2e/tools/validator/src/validator/config/__init__.py b/e2e/tools/validator/src/validator/config/__init__.py index 79f459199d..d974fc14dc 100644 --- a/e2e/tools/validator/src/validator/config/__init__.py +++ b/e2e/tools/validator/src/validator/config/__init__.py @@ -91,8 +91,8 @@ def load(config_file: str) -> Validator: query_path = config.get('query_path', 'query.json' ) return Validator( - remote=remote, - metal=metal, + remote=remote, + metal=metal, prometheus=prometheus, query_path=query_path ) diff --git a/e2e/tools/validator/src/validator/prometheus/__init__.py b/e2e/tools/validator/src/validator/prometheus/__init__.py index 9b40e6d6e3..032e76aaeb 100644 --- a/e2e/tools/validator/src/validator/prometheus/__init__.py +++ b/e2e/tools/validator/src/validator/prometheus/__init__.py @@ -3,14 +3,14 @@ from datetime import datetime import numpy as np from datetime import datetime -from validator import config +from validator import config from statistics import fmean class MetricsValidatorResult(NamedTuple): # error list el: List[float] # mean error - me: float + me: float #TODO: Include Environment Variables if desired @@ -19,7 +19,7 @@ def __init__(self, prom: config.Prometheus): self.prom_client = PrometheusConnect(prom.url, headers=None, disable_ssl=True) self.step = prom.step - + def custom_metric_query(self, start_time: datetime, end_time: datetime, query: str): return self.prom_client.custom_query_range( query=query, @@ -29,10 +29,10 @@ def custom_metric_query(self, start_time: datetime, end_time: datetime, query: s ) - def compare_metrics(self, start_time: datetime, - end_time: datetime, + def compare_metrics(self, start_time: datetime, + end_time: datetime, query: str - ) -> MetricsValidatorResult: + ) -> MetricsValidatorResult: query_metrics = self.custom_metric_query(start_time, end_time, query) cleaned_expected_metrics = retrieve_timestamp_value_metrics(query_metrics[0]) @@ -47,7 +47,7 @@ def retrieve_timestamp_value_metrics(prom_query_response) -> List[float]: for element in prom_query_response['values']: acquired_data.append(float(element[1])) return acquired_data - + # if __name__ == "__main__": # prom_metrics_validator = PromMetricsValidator("http://localhost:9091") @@ -73,4 +73,3 @@ def retrieve_timestamp_value_metrics(prom_query_response) -> List[float]: # print(deltas_func(cleaned_validator_data, cleaned_validated_data)) # print(percentage_err(cleaned_validator_data, cleaned_validated_data)) # - diff --git a/e2e/tools/validator/src/validator/specs/__init__.py b/e2e/tools/validator/src/validator/specs/__init__.py index 9d902ad9ba..1a22392b81 100644 --- a/e2e/tools/validator/src/validator/specs/__init__.py +++ b/e2e/tools/validator/src/validator/specs/__init__.py @@ -66,4 +66,4 @@ def get_vm_dram_size(login: str = "root", vm_addr: str = "my-vm", key_path: str for line in ssh.stdout.decode().split("\n"): if "MemTotal" in line: vm_dram_size = line.split(":")[1].strip() - return vm_dram_size \ No newline at end of file + return vm_dram_size diff --git a/e2e/tools/validator/src/validator/stresser/__init__.py b/e2e/tools/validator/src/validator/stresser/__init__.py index 04e5a6c96f..230cd1b05a 100644 --- a/e2e/tools/validator/src/validator/stresser/__init__.py +++ b/e2e/tools/validator/src/validator/stresser/__init__.py @@ -1,5 +1,5 @@ import paramiko -from validator import config +from validator import config from typing import NamedTuple from datetime import datetime @@ -9,7 +9,7 @@ class ScriptResult(NamedTuple): start_time : datetime end_time : datetime -class Remote: +class Remote: def __init__(self, config: config.Remote): self.host = config.host self.pkey = config.pkey @@ -22,7 +22,7 @@ def __init__(self, config: config.Remote): def __repr__(self): return f"" - + def connect(self): print(f"connecting -> {self.user}@{self.host}") @@ -34,7 +34,7 @@ def connect(self): ) else: self.ssh_client.connect( - hostname=self.host, port=self.port, + hostname=self.host, port=self.port, username=self.user, password=self.password) def copy(self, script_path, target_script): @@ -62,7 +62,7 @@ def run_script(self, script_path): print("script execution successful") else: print("script execution failed") - + print("logs for stress test:") for line in stdout: print(" ", line.strip()) diff --git a/e2e/tools/validator/tests/validator/cases/test_cases.py b/e2e/tools/validator/tests/validator/cases/test_cases.py index 777d05abbe..b267d621fe 100644 --- a/e2e/tools/validator/tests/validator/cases/test_cases.py +++ b/e2e/tools/validator/tests/validator/cases/test_cases.py @@ -22,7 +22,7 @@ def test_load_cases_basic(basic_raw_prom_queries): interval='12s', step='3s' ) - + vm_config = VM( pid=17310, name='' diff --git a/e2e/tools/validator/tests/validator/prometheus/test_prometheus.py b/e2e/tools/validator/tests/validator/prometheus/test_prometheus.py index 8e60999b6a..55f6259fe5 100644 --- a/e2e/tools/validator/tests/validator/prometheus/test_prometheus.py +++ b/e2e/tools/validator/tests/validator/prometheus/test_prometheus.py @@ -1,7 +1,7 @@ import pytest -from validator.prometheus import (absolute_percentage_error, - absolute_error, - mean_absolute_error, +from validator.prometheus import (absolute_percentage_error, + absolute_error, + mean_absolute_error, mean_absolute_percentage_error, mean_squared_error, root_mean_squared_error, @@ -12,30 +12,30 @@ @pytest.fixture def prom_responses(): - return [{'metric': - {'command': 'worker', 'container_id': 'emulator', 'instance': 'kepler:9100', - 'job': 'metal', 'mode': 'dynamic', 'pid': '17341', 'source': 'intel_rapl', - 'vm_id': 'machine-qemu-1-ubuntu22.04'}, 'values': - [[1716252592, '0.09833333333333548'], [1716252595, '0.08933333333333356'], - [1716252598, '0.12299999999999991'], [1716252601, '0.10299999999999916'], - [1716252604, '0.10566666666666592'], [1716252607, '1.3239999999999996'], + return [{'metric': + {'command': 'worker', 'container_id': 'emulator', 'instance': 'kepler:9100', + 'job': 'metal', 'mode': 'dynamic', 'pid': '17341', 'source': 'intel_rapl', + 'vm_id': 'machine-qemu-1-ubuntu22.04'}, 'values': + [[1716252592, '0.09833333333333548'], [1716252595, '0.08933333333333356'], + [1716252598, '0.12299999999999991'], [1716252601, '0.10299999999999916'], + [1716252604, '0.10566666666666592'], [1716252607, '1.3239999999999996'], [1716252610, '3.7116666666666664'], [1716252613, '5.317999999999999']]}] -@pytest.fixture +@pytest.fixture def prom_values(): return { - "prom_values_empty_sample_one": [[1716252592, 0.09833333333333548], [1716252595, 0.08933333333333356], + "prom_values_empty_sample_one": [[1716252592, 0.09833333333333548], [1716252595, 0.08933333333333356], [1716252598, 0.12299999999999991], [1716252601, 0.10299999999999916]], - "prom_values_empty_sample_two": [[1716252591, 0.09833333333333548], [1716252596, 0.08933333333333356], + "prom_values_empty_sample_two": [[1716252591, 0.09833333333333548], [1716252596, 0.08933333333333356], [1716252599, 0.12299999999999991], [1716252600, 0.10299999999999916]], - "prom_values_three_common_sample_one": [[1716252592, 0.09833333333333548], - [1716252595, 0.08933333333333356], - [1716252598, 0.12299999999999991], + "prom_values_three_common_sample_one": [[1716252592, 0.09833333333333548], + [1716252595, 0.08933333333333356], + [1716252598, 0.12299999999999991], [1716252601, 0.10299999999999916]], - "prom_values_three_common_sample_two": [[1716252592, 0.09833333333333548], - [1716252595, 0.08933333333333356], - [1716252598, 0.12299999999999999], + "prom_values_three_common_sample_two": [[1716252592, 0.09833333333333548], + [1716252595, 0.08933333333333356], + [1716252598, 0.12299999999999999], [1716252602, 0.10299999999999916]] } @@ -75,8 +75,8 @@ def test_retrieve_timestamp_value_metrics(prom_responses): def test_acquire_datapoints_with_common_timestamps(prom_values): prom_one_sample_empty = prom_values["prom_values_empty_sample_one"] prom_two_sample_empty = prom_values["prom_values_empty_sample_two"] - - one_sample_empty, two_sample_empty = acquire_datapoints_with_common_timestamps(prom_one_sample_empty, + + one_sample_empty, two_sample_empty = acquire_datapoints_with_common_timestamps(prom_one_sample_empty, prom_two_sample_empty) assert len(one_sample_empty) == 0 and len(two_sample_empty) == 0 @@ -84,7 +84,7 @@ def test_acquire_datapoints_with_common_timestamps(prom_values): prom_two_sample_three_common_timestamps = prom_values["prom_values_three_common_sample_two"] one_sample_three, two_sample_three = acquire_datapoints_with_common_timestamps( - prom_one_sample_three_common_timestamps, + prom_one_sample_three_common_timestamps, prom_two_sample_three_common_timestamps) assert len(one_sample_three) == 3 and len(two_sample_three) == 3 diff --git a/e2e/tools/validator/tests/validator/stresser/test_stresser.py b/e2e/tools/validator/tests/validator/stresser/test_stresser.py index 5710fa403e..241424553b 100644 --- a/e2e/tools/validator/tests/validator/stresser/test_stresser.py +++ b/e2e/tools/validator/tests/validator/stresser/test_stresser.py @@ -21,4 +21,3 @@ def test_run_script_on_vm(remote_params): start_time = script_result.start_time end_time = script_result.end_time assert start_time < end_time - diff --git a/e2e/tools/validator/validator.yaml.sample b/e2e/tools/validator/validator.yaml.sample index efabac4901..63112f7e56 100644 --- a/e2e/tools/validator/validator.yaml.sample +++ b/e2e/tools/validator/validator.yaml.sample @@ -18,4 +18,4 @@ prometheus: interval: 30s steps: 10s -query_path: ./query.json \ No newline at end of file +query_path: ./query.json diff --git a/enhancements/CICDv1.md b/enhancements/CICDv1.md index 01e3e56679..ac7c04c67f 100644 --- a/enhancements/CICDv1.md +++ b/enhancements/CICDv1.md @@ -17,7 +17,7 @@ tracking-links: # link to related GitHub issues ## Summary As we onboarded with CNCF sandbox, now it's time to review and open our mind on CI/CD pipeline. -For example, +For example, - Open to cloud service provider's contribute with k8s environment and we run our CI/CD pipeline on it. - Open to hardware provider integrate kepler to verify kepler running on specific hardware well or not. Further see discussion at [#711](https://github.com/sustainable-computing-io/kepler/pull/711). - To quick response to CI/CD breaks due to github action agent upgrade as cases happens in the past below: @@ -31,7 +31,7 @@ Hence, as infrastructure as code, we have motivations to make our CI/CD pipeline - Support development branch and stable branch for pipeline. > For either development kepler or hardware provide verification usage. - Quick response for github agent update.(or quick response for CI/CD breaking related with github agent) -- Quick update version of tools we used, for example kind/kubectl. +- Quick update version of tools we used, for example kind/kubectl. > We should keep update our tooling version to avoid using any duplicated version. - Flexible the k8s cluster adoption for micro shift/minikube or others. > For could provider usage. @@ -50,7 +50,7 @@ Hence, as infrastructure as code, we have motivations to make our CI/CD pipeline ### Non-Goals -- Switch to other CI/CD tool. +- Switch to other CI/CD tool. **Note**: no matter which CI/CD tool we are using, the infrastructure as code keep the same. Hence integration with specific CI/CD tool is no goal by treated as just invoke our infrastructure as code. ## Proposal diff --git a/enhancements/README.md b/enhancements/README.md index 0f10671f00..0627d9e936 100644 --- a/enhancements/README.md +++ b/enhancements/README.md @@ -1,8 +1,8 @@ -## Kepler enhancements +## Kepler enhancements This folder is meant to hold design discussions for Kepler feature requests and issues. Ideally, design discussions should follow issues from the [Kepler Project Board](https://github.com/orgs/sustainable-computing-io/projects). -For example, view the [kepler-release-0.4-planning](https://github.com/orgs/sustainable-computing-io/projects/2). +For example, view the [kepler-release-0.4-planning](https://github.com/orgs/sustainable-computing-io/projects/2). To create a design discussion for a current issue: diff --git a/enhancements/Release_workflow.md b/enhancements/Release_workflow.md index 3ccb7019d2..5c936ddb7a 100644 --- a/enhancements/Release_workflow.md +++ b/enhancements/Release_workflow.md @@ -33,7 +33,7 @@ This document is created for our next steps integration works, as in [CICDv1](./ ### Non-Goals -1. Self host github action integration. Considering with privilege issue on self hosted BM... mark out of scope. +1. Self host github action integration. Considering with privilege issue on self hosted BM... mark out of scope. 1. Test scope as metric of OS, CPU arch, k8s platform is collecting in our google doc as meeting minutes, and some OS/CPU arch may need to test manually or by other CI tooling support, hence mark it out of scope today. ## Proposal @@ -41,7 +41,7 @@ This document is created for our next steps integration works, as in [CICDv1](./ As we have kepler release in each 3 months. | Timeline | Action | -|---| --- | +|---| --- | | 1~2 month | kepler-action development, maybe just bump version in regular | | 2 month | kepler-action release | | 2~3 month | kepler, kepler-helm-chat, kepler-operator... default branch switch to kepler action | diff --git a/enhancements/TEMPLATE.md b/enhancements/TEMPLATE.md index efa9c00e74..5dd44c5ef5 100644 --- a/enhancements/TEMPLATE.md +++ b/enhancements/TEMPLATE.md @@ -101,11 +101,11 @@ Consider including folks that also work outside your immediate sub-project. ### Drawbacks The idea is to find the best form of an argument why this enhancement should -_not_ be implemented. +_not_ be implemented. -What trade-offs (technical/efficiency cost, user experience, flexibility, +What trade-offs (technical/efficiency cost, user experience, flexibility, supportability, etc) must be made in order to implement this? What are the reasons -we might not want to undertake this proposal, and how do we overcome them? +we might not want to undertake this proposal, and how do we overcome them? Does this proposal implement a behavior that's new/unique/novel? Is it poorly aligned with existing user expectations? Will it be a significant maintenance diff --git a/enhancements/ginkgov2.md b/enhancements/ginkgov2.md index 6053c4f657..cd25e37d5d 100644 --- a/enhancements/ginkgov2.md +++ b/enhancements/ginkgov2.md @@ -37,7 +37,7 @@ Test coverage up to 50% ### Workflow Description ![usage](images/ginkgov2_vscode.png) -after this change, we are able to +after this change, we are able to - Click at left side bar to run all test case at local. - For any package, open a file click run package tests. - Find test coverage in visual way, green for covered, red for not. diff --git a/enhancements/platform-validation.md b/enhancements/platform-validation.md index 6d9c1027e6..b57c3a7621 100644 --- a/enhancements/platform-validation.md +++ b/enhancements/platform-validation.md @@ -113,7 +113,7 @@ Directly check the Kepler exposed metrics by port forwarding port 9102 to host p Pros: Check metrics on the very beginning of dataflow, direct evaluation on Kepler's collector and exporter functionalities. -Cons: Kepler exporter metrics can be regarded as snapshots per three seconds(current defautl scrape interval), it may not be intuitive to those observability concepts of power consumption and power attribution. +Cons: Kepler exporter metrics can be regarded as snapshots per three seconds(current defautl scrape interval), it may not be intuitive to those observability concepts of power consumption and power attribution. * Check on Prometheus. diff --git a/grafana-dashboards/Kepler-Exporter.json b/grafana-dashboards/Kepler-Exporter.json index aa19abc440..71c79d861d 100644 --- a/grafana-dashboards/Kepler-Exporter.json +++ b/grafana-dashboards/Kepler-Exporter.json @@ -973,4 +973,4 @@ "uid": "NhnADUW4zIBM", "version": 1, "weekStart": "" -} \ No newline at end of file +} diff --git a/grafana-dashboards/legacy/Kepler-Exporter-Dashboard-openshift-carbon-usa.json b/grafana-dashboards/legacy/Kepler-Exporter-Dashboard-openshift-carbon-usa.json index 6a05b1452e..0db3a8c0fa 100644 --- a/grafana-dashboards/legacy/Kepler-Exporter-Dashboard-openshift-carbon-usa.json +++ b/grafana-dashboards/legacy/Kepler-Exporter-Dashboard-openshift-carbon-usa.json @@ -646,4 +646,4 @@ "title": "Kepler Exporter Dashboard", "uid": "feedc0ffee", "version": 1 -} \ No newline at end of file +} diff --git a/grafana-dashboards/legacy/Kepler-Exporter-Dashboard.json b/grafana-dashboards/legacy/Kepler-Exporter-Dashboard.json index ab7ff91f70..43aef7db02 100644 --- a/grafana-dashboards/legacy/Kepler-Exporter-Dashboard.json +++ b/grafana-dashboards/legacy/Kepler-Exporter-Dashboard.json @@ -564,4 +564,4 @@ "uid": "3tYabDL7z", "version": 23, "weekStart": "" -} \ No newline at end of file +} diff --git a/hack/build-images.sh b/hack/build-images.sh index 771ec8c2c3..7767c6c597 100755 --- a/hack/build-images.sh +++ b/hack/build-images.sh @@ -32,7 +32,7 @@ function create_builx_builder () { mv ${BUILDX_BIN} ~/.docker/cli-plugins/docker-buildx docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - + docker buildx create --name multi-arch --platform "linux/amd64,linux/s390x,linux/arm64" --use docker buildx ls docker buildx inspect --bootstrap @@ -72,7 +72,7 @@ function build_image_base() { tag=$(date +%Y%m%d%H%M%s) - for attacher in ${supported_attacher[@]}; do + for attacher in ${supported_attacher[@]}; do for arch in ${supported_arches[@]}; do if [ -e ./build/Dockerfile.${attacher}.base.${kernel_arch} ]; then @@ -134,10 +134,9 @@ case "$1" in build_image_kepler ;; "help") - help; + help; exit 0 ;; - (*) + (*) help 1>&2; exit 1 ;; esac - diff --git a/hack/golint.sh b/hack/golint.sh index 72adc1fa1d..bd3def4bee 100755 --- a/hack/golint.sh +++ b/hack/golint.sh @@ -32,4 +32,4 @@ docker run \ --env GO111MODULE=on \ --workdir /app \ golangci/golangci-lint:${IMAGE_VERSION} \ - golangci-lint run \ No newline at end of file + golangci-lint run diff --git a/manifests/compose/dev/compose.yaml b/manifests/compose/dev/compose.yaml index 7448ac154b..bcfcdfbc4c 100644 --- a/manifests/compose/dev/compose.yaml +++ b/manifests/compose/dev/compose.yaml @@ -17,7 +17,7 @@ services: ports: # NOTE: use 9888 to keep the host 8888 port free for any local testing - # e.g. sudo ./bin/kepler + # e.g. sudo ./bin/kepler - "9188:8888" privileged: true pid: host diff --git a/manifests/compose/mock-acpi/compose.yaml b/manifests/compose/mock-acpi/compose.yaml index bf911294c6..6c9800a4f9 100644 --- a/manifests/compose/mock-acpi/compose.yaml +++ b/manifests/compose/mock-acpi/compose.yaml @@ -19,7 +19,7 @@ services: ports: # NOTE: use 9188 to keep the host 8888 port free for any local testing - # e.g. sudo ./bin/kepler + # e.g. sudo ./bin/kepler - "9188:8888" privileged: true pid: host diff --git a/manifests/compose/mock-acpi/turbostat/Dockerfile b/manifests/compose/mock-acpi/turbostat/Dockerfile index 91103fe8e7..7171f5fd1c 100644 --- a/manifests/compose/mock-acpi/turbostat/Dockerfile +++ b/manifests/compose/mock-acpi/turbostat/Dockerfile @@ -6,4 +6,3 @@ WORKDIR /app COPY ./run_turbostat.py . USER 0 CMD ["python3", "/app/run_turbostat.py"] - diff --git a/manifests/compose/mock-acpi/turbostat/run_turbostat.py b/manifests/compose/mock-acpi/turbostat/run_turbostat.py index c17f17ab97..a57cc7b82f 100644 --- a/manifests/compose/mock-acpi/turbostat/run_turbostat.py +++ b/manifests/compose/mock-acpi/turbostat/run_turbostat.py @@ -53,4 +53,3 @@ def run_turbostat(): except KeyboardInterrupt: # Exit the program if the user presses Ctrl+C sys.exit(0) - diff --git a/manifests/compose/mock-acpi/turbostat/turbostat.yaml b/manifests/compose/mock-acpi/turbostat/turbostat.yaml index 34e37dba56..8735c1759b 100644 --- a/manifests/compose/mock-acpi/turbostat/turbostat.yaml +++ b/manifests/compose/mock-acpi/turbostat/turbostat.yaml @@ -19,4 +19,3 @@ services: target: /sys networks: - kepler-network - diff --git a/manifests/compose/monitoring/compose.yaml b/manifests/compose/monitoring/compose.yaml index 9f12a81f16..e4e76646e1 100644 --- a/manifests/compose/monitoring/compose.yaml +++ b/manifests/compose/monitoring/compose.yaml @@ -6,8 +6,8 @@ services: context: ./prometheus ports: - "9090:9090" - volumes: - - prom-data:/prometheus + volumes: + - prom-data:/prometheus - type: bind source: ./prometheus/prometheus.yml target: /etc/prometheus/prometheus.yml diff --git a/manifests/compose/monitoring/grafana/Dockerfile b/manifests/compose/monitoring/grafana/Dockerfile index c93eff7ff2..fa60323375 100644 --- a/manifests/compose/monitoring/grafana/Dockerfile +++ b/manifests/compose/monitoring/grafana/Dockerfile @@ -2,4 +2,3 @@ FROM quay.io/ceph/grafana:10.4.2 COPY /datasource.yml /etc/grafana/provisioning/datasources/ COPY /dashboards.yml /etc/grafana/provisioning/dashboards/ - diff --git a/manifests/compose/monitoring/prometheus/prometheus.yml b/manifests/compose/monitoring/prometheus/prometheus.yml index 9a5b33a964..74382351dc 100644 --- a/manifests/compose/monitoring/prometheus/prometheus.yml +++ b/manifests/compose/monitoring/prometheus/prometheus.yml @@ -19,7 +19,7 @@ scrape_configs: static_configs: - targets: ['localhost:9090'] -# Load rules once and periodically evaluate them according to +# Load rules once and periodically evaluate them according to # the global 'evaluation_interval'. rule_files: - /etc/prometheus/rules/*.yaml @@ -30,8 +30,8 @@ scrape_config_files: - /etc/prometheus/scrape-configs/*.yaml - /etc/prometheus/scrape-configs/*.yml - # NOTE: e.g. to add more jobs to scrape a - # VM with IP 192.168.122.78 on port 8888, + # NOTE: e.g. to add more jobs to scrape a + # VM with IP 192.168.122.78 on port 8888, # - job_name: 'vm' # static_configs: # - targets: ['192.168.122.100:8888'] diff --git a/manifests/compose/validation/README.md b/manifests/compose/validation/README.md index 9f15356efa..fb78f0a37f 100644 --- a/manifests/compose/validation/README.md +++ b/manifests/compose/validation/README.md @@ -5,7 +5,7 @@ In order to validate models, here is the recommended setup assuming the development box is a Baremetal. 1. Create a Virtual Machine -2. Ensure the CPU is pinned to the VM. +2. Ensure the CPU is pinned to the VM. E.g. if you are using libvirt, you can use `vcpupin` as follows ``` @@ -14,11 +14,11 @@ the development box is a Baremetal. ### Baremetal -The `metal` compose target should be run on a metal / development machine. This +The `metal` compose target should be run on a metal / development machine. This target deploys the following - kepler - built from source with process metrics enabled - scaphandre: as a target to compare kepler metrics against - - prometheus: that scrapes - metal kepler, scaphandre, and a host identified as `vm` + - prometheus: that scrapes - metal kepler, scaphandre, and a host identified as `vm` - grafana with a dashboard for comparing metal process metrics (qemu) against vm **usage: ** @@ -31,15 +31,14 @@ docker compose up ### Virtual Machine -2. `vm` compose target should be run on a Virtual Machine. +2. `vm` compose target should be run on a Virtual Machine. This target deploys `kepler` with `estimator` and `model-server` version: 0.7.7 -Usage: +Usage: ``` git clone https://github.com/sustainable-computing-io/kepler cd manifests/compose/validation/metal docker compose up ``` -Ensure the setup works by `curl http://:9100/metrics` from the Baremetal +Ensure the setup works by `curl http://:9100/metrics` from the Baremetal machine. - diff --git a/manifests/compose/validation/metal/compose.yaml b/manifests/compose/validation/metal/compose.yaml index ae13963504..4aa68cd8da 100644 --- a/manifests/compose/validation/metal/compose.yaml +++ b/manifests/compose/validation/metal/compose.yaml @@ -17,7 +17,7 @@ services: ports: # NOTE: use 9888 to keep the host 8888 port free for any local testing - # e.g. sudo ./bin/kepler + # e.g. sudo ./bin/kepler - "9188:8888" privileged: true pid: host @@ -59,7 +59,7 @@ services: scaphandre: image: hubblo/scaphandre privileged: true - ports: + ports: - "8880:8080" volumes: - type: bind @@ -76,9 +76,9 @@ networks: scaph-network: kepler-network: # - # + # # NOTE: To allow access to VM from prometheus container - # external network named - virt-net must be created using + # external network named - virt-net must be created using # the following command # # use: diff --git a/manifests/compose/validation/vm/compose.yaml b/manifests/compose/validation/vm/compose.yaml index 398053cb3e..a41220eed3 100644 --- a/manifests/compose/validation/vm/compose.yaml +++ b/manifests/compose/validation/vm/compose.yaml @@ -3,7 +3,7 @@ name: vm services: kepler: image: quay.io/sustainable_computing_io/kepler:latest - ports: + ports: - "9100:9100" privileged: true pid: host @@ -29,7 +29,7 @@ services: target: /var/lib/kepler/data/cpus.yaml # NOTE: for estimator - kepler communication - - kepler-tmp:/tmp + - kepler-tmp:/tmp cap_add: - ALL diff --git a/manifests/compose/validation/vm/kepler/etc/kepler/kepler.config/ENABLE_PROCESS_METRICS b/manifests/compose/validation/vm/kepler/etc/kepler/kepler.config/ENABLE_PROCESS_METRICS index f32a5804e2..27ba77ddaf 100644 --- a/manifests/compose/validation/vm/kepler/etc/kepler/kepler.config/ENABLE_PROCESS_METRICS +++ b/manifests/compose/validation/vm/kepler/etc/kepler/kepler.config/ENABLE_PROCESS_METRICS @@ -1 +1 @@ -true \ No newline at end of file +true diff --git a/manifests/k8s/config/base/kustomization.yaml b/manifests/k8s/config/base/kustomization.yaml index 052ea4c104..ef20d38b5a 100644 --- a/manifests/k8s/config/base/kustomization.yaml +++ b/manifests/k8s/config/base/kustomization.yaml @@ -2,7 +2,7 @@ namespace: kepler commonLabels: sustainable-computing.io/app: kepler - + bases: - ../rbac - ../exporter @@ -19,7 +19,7 @@ patchesJson6902: patch: |- - op: replace path: /metadata/namespace - value: monitoring + value: monitoring patchesStrategicMerge: [] # add this line to set model-server endpoint to kepler @@ -27,4 +27,4 @@ patchesStrategicMerge: [] # add this line to change log level for debugging # - ./patch/patch-debug.yaml # add this line to get high metric granularity (3s interval) -# - ./patch/patch-high-granularity.yaml \ No newline at end of file +# - ./patch/patch-high-granularity.yaml diff --git a/manifests/k8s/config/base/patch/patch-debug.yaml b/manifests/k8s/config/base/patch/patch-debug.yaml index 71cd924389..9a09ae02ca 100644 --- a/manifests/k8s/config/base/patch/patch-debug.yaml +++ b/manifests/k8s/config/base/patch/patch-debug.yaml @@ -4,4 +4,4 @@ metadata: name: kepler-cfm namespace: system data: - KEPLER_LOG_LEVEL: "5" \ No newline at end of file + KEPLER_LOG_LEVEL: "5" diff --git a/manifests/k8s/config/base/patch/patch-high-granularity.yaml b/manifests/k8s/config/base/patch/patch-high-granularity.yaml index c6a5e1eab0..da3b0700ef 100644 --- a/manifests/k8s/config/base/patch/patch-high-granularity.yaml +++ b/manifests/k8s/config/base/patch/patch-high-granularity.yaml @@ -4,4 +4,4 @@ metadata: name: kepler-cfm namespace: system data: - PROMETHEUS_SCRAPE_INTERVAL: "3s" \ No newline at end of file + PROMETHEUS_SCRAPE_INTERVAL: "3s" diff --git a/manifests/k8s/config/base/patch/patch-model-server-kepler-config.yaml b/manifests/k8s/config/base/patch/patch-model-server-kepler-config.yaml index cc6283e15b..6ae51cac6b 100644 --- a/manifests/k8s/config/base/patch/patch-model-server-kepler-config.yaml +++ b/manifests/k8s/config/base/patch/patch-model-server-kepler-config.yaml @@ -10,4 +10,4 @@ data: $(MODEL_SERVER_PORT) MODEL_SERVER_URL: http://kepler-model-server.$(MODEL_SERVER_NAMESPACE).svc.cluster.local:$(MODEL_SERVER_PORT) MODEL_SERVER_MODEL_REQ_PATH: /model - MODEL_SERVER_MODEL_LIST_PATH: /best-models \ No newline at end of file + MODEL_SERVER_MODEL_LIST_PATH: /best-models diff --git a/manifests/k8s/config/dashboard/README.md b/manifests/k8s/config/dashboard/README.md index 1d4e5d9c5b..80321a9345 100644 --- a/manifests/k8s/config/dashboard/README.md +++ b/manifests/k8s/config/dashboard/README.md @@ -1,6 +1,6 @@ # Dashboard versions for Kepler on OpenShift -We have found that with some installations Grafana does not scale well to the data Kepler is providing so the dashboard is either slow to render of doesn't show any data. +We have found that with some installations Grafana does not scale well to the data Kepler is providing so the dashboard is either slow to render of doesn't show any data. For that reeason to allow users to visualise Kepler data with the demo dashboard we are now providing two versions. 1. The original dashboard that will visualise all Kepler data diff --git a/manifests/k8s/config/dashboard/deploy-grafana-topk.sh b/manifests/k8s/config/dashboard/deploy-grafana-topk.sh index 0e9d3b68dd..77061abd29 100755 --- a/manifests/k8s/config/dashboard/deploy-grafana-topk.sh +++ b/manifests/k8s/config/dashboard/deploy-grafana-topk.sh @@ -48,4 +48,3 @@ while ! oc get grafanadashboard --all-namespaces; do done oc apply -f $(pwd)/manifests/k8s/config/dashboard/04-grafana-dashboard-topk.yaml - diff --git a/manifests/k8s/config/exporter/kustomizeconfig.yaml b/manifests/k8s/config/exporter/kustomizeconfig.yaml index ea18a8d879..743ea1b1ea 100644 --- a/manifests/k8s/config/exporter/kustomizeconfig.yaml +++ b/manifests/k8s/config/exporter/kustomizeconfig.yaml @@ -1,4 +1,4 @@ -varReference: +varReference: - kind: SecurityContextConstraints group: security.openshift.io version: v1 @@ -28,4 +28,4 @@ varReference: group: monitoring.coreos.com version: v1 name: kepler-exporter - path: spec/endpoints/interval \ No newline at end of file + path: spec/endpoints/interval diff --git a/manifests/k8s/config/exporter/patch/patch-ci.yaml b/manifests/k8s/config/exporter/patch/patch-ci.yaml index 257fcc3fb4..01e4aaef42 100644 --- a/manifests/k8s/config/exporter/patch/patch-ci.yaml +++ b/manifests/k8s/config/exporter/patch/patch-ci.yaml @@ -23,4 +23,4 @@ spec: - name: usr-src hostPath: path: /usr/src - type: Directory \ No newline at end of file + type: Directory diff --git a/manifests/k8s/config/exporter/patch/patch-estimator-sidecar.yaml b/manifests/k8s/config/exporter/patch/patch-estimator-sidecar.yaml index bb2207739e..2d0079a1ce 100644 --- a/manifests/k8s/config/exporter/patch/patch-estimator-sidecar.yaml +++ b/manifests/k8s/config/exporter/patch/patch-estimator-sidecar.yaml @@ -55,4 +55,4 @@ spec: - emptyDir: {} name: tmp - emptyDir: {} - name: mnt \ No newline at end of file + name: mnt diff --git a/manifests/k8s/config/exporter/patch/patch-habana.yaml b/manifests/k8s/config/exporter/patch/patch-habana.yaml index 6bac4ed786..39c4401d8e 100644 --- a/manifests/k8s/config/exporter/patch/patch-habana.yaml +++ b/manifests/k8s/config/exporter/patch/patch-habana.yaml @@ -10,4 +10,4 @@ spec: hostNetwork: true containers: - name: kepler-exporter - image: quay.io/sustainable_computing_io/kepler:latest-habana \ No newline at end of file + image: quay.io/sustainable_computing_io/kepler:latest-habana diff --git a/manifests/k8s/config/exporter/patch/patch-openshift.yaml b/manifests/k8s/config/exporter/patch/patch-openshift.yaml index 04b9f8a732..cb7a91cc79 100644 --- a/manifests/k8s/config/exporter/patch/patch-openshift.yaml +++ b/manifests/k8s/config/exporter/patch/patch-openshift.yaml @@ -26,4 +26,4 @@ spec: - name: kernel-src hostPath: path: /usr/src/kernels - type: Directory \ No newline at end of file + type: Directory diff --git a/manifests/k8s/config/exporter/patch/patch-qat.yaml b/manifests/k8s/config/exporter/patch/patch-qat.yaml index 0d8eb93eaf..d73e61060e 100644 --- a/manifests/k8s/config/exporter/patch/patch-qat.yaml +++ b/manifests/k8s/config/exporter/patch/patch-qat.yaml @@ -22,4 +22,4 @@ spec: volumes: - name: qat hostPath: - path: /usr/local/bin/adf_ctl \ No newline at end of file + path: /usr/local/bin/adf_ctl diff --git a/manifests/k8s/config/exporter/patch/patch-rootless.yaml b/manifests/k8s/config/exporter/patch/patch-rootless.yaml index ed1b4b671d..3e92aab842 100644 --- a/manifests/k8s/config/exporter/patch/patch-rootless.yaml +++ b/manifests/k8s/config/exporter/patch/patch-rootless.yaml @@ -20,4 +20,4 @@ spec: - SYS_ADMIN - SYS_RESOURCE seLinuxOptions: - level: 's0' + level: 's0' diff --git a/manifests/k8s/config/exporter/prometheus_common_rules.yaml b/manifests/k8s/config/exporter/prometheus_common_rules.yaml index 6d11625c9c..53d7b33c0e 100644 --- a/manifests/k8s/config/exporter/prometheus_common_rules.yaml +++ b/manifests/k8s/config/exporter/prometheus_common_rules.yaml @@ -13,7 +13,7 @@ spec: - interval: 1m name: kepler-common-rules rules: - # NOTE: 2m step interval is good enough granularity for 24h and has + # NOTE: 2m step interval is good enough granularity for 24h and has # at least 4 samples - expr: | sum by(container_namespace, pod_name) ( @@ -22,8 +22,8 @@ spec: record: kepler:container_joules_total:increase:24h:by_ns_pod - expr: | - sum by(container_namespace) ( - kepler:container_joules_total:increase:24h:by_ns_pod + sum by(container_namespace) ( + kepler:container_joules_total:increase:24h:by_ns_pod ) record: kepler:container_joules_total:increase:24h:by_ns @@ -32,7 +32,7 @@ spec: name: kepler-low-res-rules rules: # NOTE: joules/second -> watts, so irate(joules) -> watts - # 2m range ensures there are at least 4 scrapes are present when + # 2m range ensures there are at least 4 scrapes are present when # evaluating rules at low resolution (30s scrape instead of 3s) - expr: | sum by (container_namespace, pod_name) ( diff --git a/manifests/k8s/config/exporter/prometheus_common_service_monitor.yaml b/manifests/k8s/config/exporter/prometheus_common_service_monitor.yaml index 959d870801..6ef7c00295 100644 --- a/manifests/k8s/config/exporter/prometheus_common_service_monitor.yaml +++ b/manifests/k8s/config/exporter/prometheus_common_service_monitor.yaml @@ -23,4 +23,4 @@ spec: app.kubernetes.io/component: exporter namespaceSelector: matchNames: - - $(KEPLER_NAMESPACE) \ No newline at end of file + - $(KEPLER_NAMESPACE) diff --git a/manifests/k8s/config/exporter/prometheus_high_granularity_rules.yaml b/manifests/k8s/config/exporter/prometheus_high_granularity_rules.yaml index 5996ea0225..ac1a10d014 100644 --- a/manifests/k8s/config/exporter/prometheus_high_granularity_rules.yaml +++ b/manifests/k8s/config/exporter/prometheus_high_granularity_rules.yaml @@ -8,13 +8,13 @@ metadata: name: kepler-high-granularity-rules spec: groups: - # NOTE: rules are evaluated every 10s instead of scrape interval 3s + # NOTE: rules are evaluated every 10s instead of scrape interval 3s # since that will be quite taxing on Prometheus - interval: 10s name: kepler-high-granularity-rules rules: # NOTE: joules/second -> watts, so irate(joules) -> watts - # 15s range ensures there are at least 4 scrapes are present when + # 15s range ensures there are at least 4 scrapes are present when # evaluating rules at high resolution 3s - expr: | sum by (container_namespace, pod_name) ( diff --git a/manifests/k8s/config/model-server/kustomization.yaml b/manifests/k8s/config/model-server/kustomization.yaml index c22b9f0db1..2f819771de 100644 --- a/manifests/k8s/config/model-server/kustomization.yaml +++ b/manifests/k8s/config/model-server/kustomization.yaml @@ -5,4 +5,4 @@ resources: patchesStrategicMerge: [] # add this line for openshift patch -# - ./patch/patch-openshift.yaml \ No newline at end of file +# - ./patch/patch-openshift.yaml diff --git a/manifests/k8s/config/model-server/patch/patch-openshift.yaml b/manifests/k8s/config/model-server/patch/patch-openshift.yaml index b93244f8f3..dbdd5266f0 100644 --- a/manifests/k8s/config/model-server/patch/patch-openshift.yaml +++ b/manifests/k8s/config/model-server/patch/patch-openshift.yaml @@ -10,4 +10,4 @@ spec: containers: - name: server-api securityContext: - privileged: true \ No newline at end of file + privileged: true diff --git a/manifests/k8s/config/rbac/k8s_clusterrole.yaml b/manifests/k8s/config/rbac/k8s_clusterrole.yaml index 49830a70e3..f7dcba67d9 100644 --- a/manifests/k8s/config/rbac/k8s_clusterrole.yaml +++ b/manifests/k8s/config/rbac/k8s_clusterrole.yaml @@ -12,4 +12,4 @@ rules: verbs: - 'get' - 'watch' - - 'list' \ No newline at end of file + - 'list' diff --git a/manifests/k8s/config/rbac/k8s_clusterrole_binding.yaml b/manifests/k8s/config/rbac/k8s_clusterrole_binding.yaml index 7dd4fb4e50..223417138e 100644 --- a/manifests/k8s/config/rbac/k8s_clusterrole_binding.yaml +++ b/manifests/k8s/config/rbac/k8s_clusterrole_binding.yaml @@ -9,4 +9,4 @@ roleRef: subjects: - kind: ServiceAccount name: kepler-sa - namespace: system \ No newline at end of file + namespace: system diff --git a/manifests/k8s/config/rbac/kustomization.yaml b/manifests/k8s/config/rbac/kustomization.yaml index 8236e781d8..9910322bca 100644 --- a/manifests/k8s/config/rbac/kustomization.yaml +++ b/manifests/k8s/config/rbac/kustomization.yaml @@ -4,4 +4,4 @@ resources: - k8s_clusterrole_binding.yaml # uncomment these two lines if prometheus deployed # - prometheus_role.yaml -# - prometheus_role_binding.yaml \ No newline at end of file +# - prometheus_role_binding.yaml diff --git a/manifests/k8s/config/rbac/prometheus_role.yaml b/manifests/k8s/config/rbac/prometheus_role.yaml index b64e7f7a42..13b58dbff8 100644 --- a/manifests/k8s/config/rbac/prometheus_role.yaml +++ b/manifests/k8s/config/rbac/prometheus_role.yaml @@ -33,4 +33,4 @@ rules: apiGroups: - networking.k8s.io resources: - - ingresses \ No newline at end of file + - ingresses diff --git a/manifests/k8s/config/rbac/prometheus_role_binding.yaml b/manifests/k8s/config/rbac/prometheus_role_binding.yaml index 9aae7b7dba..3e11a1213a 100644 --- a/manifests/k8s/config/rbac/prometheus_role_binding.yaml +++ b/manifests/k8s/config/rbac/prometheus_role_binding.yaml @@ -14,4 +14,4 @@ subjects: roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: prometheus-k8s \ No newline at end of file + name: prometheus-k8s diff --git a/manifests/k8s/config/rbac/service_account.yaml b/manifests/k8s/config/rbac/service_account.yaml index e5f837788a..3bfbfac17a 100644 --- a/manifests/k8s/config/rbac/service_account.yaml +++ b/manifests/k8s/config/rbac/service_account.yaml @@ -2,4 +2,4 @@ apiVersion: v1 kind: ServiceAccount metadata: name: kepler-sa - namespace: system \ No newline at end of file + namespace: system diff --git a/manifests/k8s/tests/cpu/Dockerfile.stress-ng b/manifests/k8s/tests/cpu/Dockerfile.stress-ng index 2c2cf63e75..8f2164ce62 100644 --- a/manifests/k8s/tests/cpu/Dockerfile.stress-ng +++ b/manifests/k8s/tests/cpu/Dockerfile.stress-ng @@ -1,3 +1,3 @@ FROM quay.io/centos/centos:stream8 -RUN yum install -y stress-ng; yum clean all \ No newline at end of file +RUN yum install -y stress-ng; yum clean all diff --git a/manifests/k8s/tests/gpu/cuda.yaml b/manifests/k8s/tests/gpu/cuda.yaml index 6f0f75a826..c230a3c485 100644 --- a/manifests/k8s/tests/gpu/cuda.yaml +++ b/manifests/k8s/tests/gpu/cuda.yaml @@ -8,7 +8,7 @@ spec: - name: cuda-vector-add image: "nvcr.io/nvidia/k8s/cuda-sample:nbody" args: - - -benchmark + - -benchmark - -numbodies=512000" resources: limits: diff --git a/packaging/rpm/kepler.service b/packaging/rpm/kepler.service index 3af8de9047..a3b61a9895 100644 --- a/packaging/rpm/kepler.service +++ b/packaging/rpm/kepler.service @@ -12,4 +12,4 @@ MemoryAccounting=yes LimitNOFILE=1048576 [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/pkg/cgroup/test/hierachywithqos/cpu/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage b/pkg/cgroup/test/hierachywithqos/cpu/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage index e5cf943e70..e8cd514efc 100644 --- a/pkg/cgroup/test/hierachywithqos/cpu/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage +++ b/pkg/cgroup/test/hierachywithqos/cpu/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage @@ -1 +1 @@ -1326531768338 \ No newline at end of file +1326531768338 diff --git a/pkg/cgroup/test/hierachywithqos/cpu/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_sys b/pkg/cgroup/test/hierachywithqos/cpu/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_sys index c227083464..573541ac97 100644 --- a/pkg/cgroup/test/hierachywithqos/cpu/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_sys +++ b/pkg/cgroup/test/hierachywithqos/cpu/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_sys @@ -1 +1 @@ -0 \ No newline at end of file +0 diff --git a/pkg/cgroup/test/hierachywithqos/cpu/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_user b/pkg/cgroup/test/hierachywithqos/cpu/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_user index e5cf943e70..e8cd514efc 100644 --- a/pkg/cgroup/test/hierachywithqos/cpu/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_user +++ b/pkg/cgroup/test/hierachywithqos/cpu/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_user @@ -1 +1 @@ -1326531768338 \ No newline at end of file +1326531768338 diff --git a/pkg/cgroup/test/hierachywithqos/memory/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.tcp.usage_in_bytes b/pkg/cgroup/test/hierachywithqos/memory/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.tcp.usage_in_bytes index c227083464..573541ac97 100644 --- a/pkg/cgroup/test/hierachywithqos/memory/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.tcp.usage_in_bytes +++ b/pkg/cgroup/test/hierachywithqos/memory/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.tcp.usage_in_bytes @@ -1 +1 @@ -0 \ No newline at end of file +0 diff --git a/pkg/cgroup/test/hierachywithqos/memory/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.usage_in_bytes b/pkg/cgroup/test/hierachywithqos/memory/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.usage_in_bytes index 40d3532156..29598a5364 100644 --- a/pkg/cgroup/test/hierachywithqos/memory/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.usage_in_bytes +++ b/pkg/cgroup/test/hierachywithqos/memory/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.usage_in_bytes @@ -1 +1 @@ -5730304 \ No newline at end of file +5730304 diff --git a/pkg/cgroup/test/hierachywithqos/memory/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.usage_in_bytes b/pkg/cgroup/test/hierachywithqos/memory/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.usage_in_bytes index 26d10be467..f10ff02272 100644 --- a/pkg/cgroup/test/hierachywithqos/memory/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.usage_in_bytes +++ b/pkg/cgroup/test/hierachywithqos/memory/kubepods.slice/kubepods-best-effort.slice/kubepods-besteffort-podda455296_3ff4_415e_aa73_535aea1f7785.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.usage_in_bytes @@ -1 +1 @@ -19963904 \ No newline at end of file +19963904 diff --git a/pkg/cgroup/test/hierarchypath/cpu/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage b/pkg/cgroup/test/hierarchypath/cpu/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage index e5cf943e70..e8cd514efc 100644 --- a/pkg/cgroup/test/hierarchypath/cpu/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage +++ b/pkg/cgroup/test/hierarchypath/cpu/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage @@ -1 +1 @@ -1326531768338 \ No newline at end of file +1326531768338 diff --git a/pkg/cgroup/test/hierarchypath/cpu/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_sys b/pkg/cgroup/test/hierarchypath/cpu/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_sys index c227083464..573541ac97 100644 --- a/pkg/cgroup/test/hierarchypath/cpu/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_sys +++ b/pkg/cgroup/test/hierarchypath/cpu/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_sys @@ -1 +1 @@ -0 \ No newline at end of file +0 diff --git a/pkg/cgroup/test/hierarchypath/cpu/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_user b/pkg/cgroup/test/hierarchypath/cpu/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_user index e5cf943e70..e8cd514efc 100644 --- a/pkg/cgroup/test/hierarchypath/cpu/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_user +++ b/pkg/cgroup/test/hierarchypath/cpu/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/cpuacct.usage_user @@ -1 +1 @@ -1326531768338 \ No newline at end of file +1326531768338 diff --git a/pkg/cgroup/test/hierarchypath/memory/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.tcp.usage_in_bytes b/pkg/cgroup/test/hierarchypath/memory/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.tcp.usage_in_bytes index c227083464..573541ac97 100644 --- a/pkg/cgroup/test/hierarchypath/memory/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.tcp.usage_in_bytes +++ b/pkg/cgroup/test/hierarchypath/memory/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.tcp.usage_in_bytes @@ -1 +1 @@ -0 \ No newline at end of file +0 diff --git a/pkg/cgroup/test/hierarchypath/memory/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.usage_in_bytes b/pkg/cgroup/test/hierarchypath/memory/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.usage_in_bytes index 40d3532156..29598a5364 100644 --- a/pkg/cgroup/test/hierarchypath/memory/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.usage_in_bytes +++ b/pkg/cgroup/test/hierarchypath/memory/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.kmem.usage_in_bytes @@ -1 +1 @@ -5730304 \ No newline at end of file +5730304 diff --git a/pkg/cgroup/test/hierarchypath/memory/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.usage_in_bytes b/pkg/cgroup/test/hierarchypath/memory/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.usage_in_bytes index 26d10be467..f10ff02272 100644 --- a/pkg/cgroup/test/hierarchypath/memory/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.usage_in_bytes +++ b/pkg/cgroup/test/hierarchypath/memory/kubepods.slice/kubepods-pod2178b456_853f_4316_9c4c_688928940bdd.slice/crio-89868dc96f57ccd419a59ebbb8e24314690dc992915b2ec6e36536d761829bd.scope/memory.usage_in_bytes @@ -1 +1 @@ -19963904 \ No newline at end of file +19963904