From ccf758ed7b8a8be68949503900509d9a422c26fc Mon Sep 17 00:00:00 2001 From: Igor Ilic Date: Thu, 9 Jan 2025 12:32:30 +0100 Subject: [PATCH] test: Test profiling on HEAD branch --- .github/workflows/profiling.yaml | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/profiling.yaml b/.github/workflows/profiling.yaml index 0ecbc960c..de4bb179d 100644 --- a/.github/workflows/profiling.yaml +++ b/.github/workflows/profiling.yaml @@ -68,33 +68,33 @@ jobs: echo "HEAD_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV # Run profiler on the base branch - - name: Run profiler on base branch - env: - BASE_SHA: ${{ env.BASE_SHA }} - run: | - echo "Profiling the base branch for code_graph_pipeline.py" - echo "Checking out base SHA: $BASE_SHA" - git checkout $BASE_SHA - echo "This is the working directory: $PWD" - # Ensure the script is executable - chmod +x cognee/api/v1/cognify/code_graph_pipeline.py - # Run Scalene - poetry run pyinstrument --renderer json -o base_results.json cognee/api/v1/cognify/code_graph_pipeline.py - - # Run profiler on head branch -# - name: Run profiler on head branch +# - name: Run profiler on base branch # env: -# HEAD_SHA: ${{ env.HEAD_SHA }} +# BASE_SHA: ${{ env.BASE_SHA }} # run: | -# echo "Profiling the head branch for code_graph_pipeline.py" -# echo "Checking out head SHA: $HEAD_SHA" -# git checkout $HEAD_SHA +# echo "Profiling the base branch for code_graph_pipeline.py" +# echo "Checking out base SHA: $BASE_SHA" +# git checkout $BASE_SHA # echo "This is the working directory: $PWD" # # Ensure the script is executable # chmod +x cognee/api/v1/cognify/code_graph_pipeline.py # # Run Scalene -# poetry run pyinstrument --renderer json -o head_results.json cognee/api/v1/cognify/code_graph_pipeline.py -# +# poetry run pyinstrument --renderer json -o base_results.json cognee/api/v1/cognify/code_graph_pipeline.py + + # Run profiler on head branch + - name: Run profiler on head branch + env: + HEAD_SHA: ${{ env.HEAD_SHA }} + run: | + echo "Profiling the head branch for code_graph_pipeline.py" + echo "Checking out head SHA: $HEAD_SHA" + git checkout $HEAD_SHA + echo "This is the working directory: $PWD" + # Ensure the script is executable + chmod +x cognee/api/v1/cognify/code_graph_pipeline.py + # Run Scalene + poetry run pyinstrument --renderer json -o head_results.json cognee/api/v1/cognify/code_graph_pipeline.py + # # Compare profiling results # - name: Compare profiling results # run: |