diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 215f1cc4a5c..c6ecbfebd83 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -441,12 +441,12 @@ jobs: # pyroscope_env: ci-smoke-ocr-evm-simulated - name: ocr2 nodes: 6 - os: ubuntu20.04-32cores-128GB + os: ubuntu20.04-16cores-64GB file: ocr2 pyroscope_env: ci-smoke-ocr2-evm-simulated - name: ocr2 nodes: 6 - os: ubuntu20.04-32cores-128GB + os: ubuntu20.04-16cores-64GB pyroscope_env: ci-smoke-ocr2-plugins-evm-simulated tag_suffix: "-plugins" # - name: vrf @@ -585,6 +585,11 @@ jobs: QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: "" + - name: DEBUG Get Resource file + uses: actions/upload-artifact@v3 + with: + name: resource.log + path: resource.log # Run this step when changes that do not need the test to run are made - name: Run Setup if: needs.changes.outputs.src == 'false' diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index 6d3cf796cea..8c6431edd0f 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -4,9 +4,12 @@ import ( "fmt" "math/big" "net/http" + "os" + "runtime" "testing" "time" + "github.com/shirou/gopsutil/cpu" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-testing-framework/logging" @@ -23,6 +26,50 @@ import ( // Tests a basic OCRv2 median feed func TestOCRv2Basic(t *testing.T) { t.Parallel() + // DEBUG: For monitoring GHA resources + resourcesFile, err := os.OpenFile("resources.log", os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644) + if err != nil { + t.Fatal(err) + } + defer resourcesFile.Close() + + go func() { + _, err := resourcesFile.WriteString("Started Monitoring\n") + if err != nil { + t.Fatal(err) + } + for { + var m runtime.MemStats + runtime.ReadMemStats(&m) + + _, err := resourcesFile.WriteString(fmt.Sprintf("%s | Alloc = %v MiB", time.Now().String(), m.Alloc/1024/1024)) + if err != nil { + t.Fatal(err) + } + _, err = resourcesFile.WriteString(fmt.Sprintf("\tTotalAlloc = %v MiB", m.TotalAlloc/1024/1024)) + if err != nil { + t.Fatal(err) + } + _, err = resourcesFile.WriteString(fmt.Sprintf("\tSys = %v MiB", m.Sys/1024/1024)) + if err != nil { + t.Fatal(err) + } + _, err = resourcesFile.WriteString(fmt.Sprintf("\tNumGC = %v\n", m.NumGC)) + if err != nil { + t.Fatal(err) + } + percentages, err := cpu.Percent(1*time.Second, false) + if err != nil { + fmt.Printf("Error retrieving CPU usage: %s\n", err) + return + } + _, err = resourcesFile.WriteString(fmt.Sprintf("%s | CPU Usage: %.2f%%\n", time.Now().String(), percentages[0])) + if err != nil { + t.Fatal(err) + } + time.Sleep(time.Second * 5) + } + }() noMedianPlugin := map[string]string{string(env.MedianPlugin.Cmd): ""} medianPlugin := map[string]string{string(env.MedianPlugin.Cmd): "chainlink-feeds"}