Bump release version

This commit is contained in:
Vasilije 2024-12-04 19:50:25 +01:00
parent cc43a8c865
commit cf51555943

View file

@ -1,11 +1,7 @@
name: Profiling Comparison for Specific File 2 name: Profiling Comparison for Specific File 2
on: on:
pull_request_target: push
types:
- opened
- reopened
- synchronize
jobs: jobs:
profiler: profiler:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -97,6 +93,7 @@ jobs:
# Compare profiling results # Compare profiling results
- name: Compare profiling results - name: Compare profiling results
run: | run: |
|
python -c ' python -c '
import json import json
try: try:
@ -106,24 +103,30 @@ jobs:
head = json.load(f) head = json.load(f)
cpu_diff = head.get("total_cpu_samples_python", 0) - base.get("total_cpu_samples_python", 0) cpu_diff = head.get("total_cpu_samples_python", 0) - base.get("total_cpu_samples_python", 0)
memory_diff = head.get("malloc_samples", 0) - base.get("malloc_samples", 0) memory_diff = head.get("malloc_samples", 0) - base.get("malloc_samples", 0)
results = [
f"CPU Usage Difference: {cpu_diff}",
f"Memory Usage Difference: {memory_diff} bytes"
]
with open("profiling_diff.txt", "w") as f: with open("profiling_diff.txt", "w") as f:
f.write(f"CPU Usage Difference: {cpu_diff}\\n") f.write("\\n".join(results) + "\\n")
f.write(f"Memory Usage Difference: {memory_diff} bytes\\n") print("\\n".join(results)) # Print results to terminal
except Exception as e: except Exception as e:
error_message = f"Error comparing profiling results: {e}"
with open("profiling_diff.txt", "w") as f: with open("profiling_diff.txt", "w") as f:
f.write(f"Error comparing profiling results: {e}\\n") f.write(error_message + "\\n")
' print(error_message) # Print error to terminal
'
# Post results to the pull request # Post results to the pull request
- name: Post profiling results to PR # - name: Post profiling results to PR
uses: actions/github-script@v6 # uses: actions/github-script@v6
with: # with:
script: | # script: |
const fs = require('fs'); # const fs = require('fs');
const diff = fs.readFileSync('profiling_diff.txt', 'utf-8'); # const diff = fs.readFileSync('profiling_diff.txt', 'utf-8');
github.rest.issues.createComment({ # github.rest.issues.createComment({
issue_number: context.issue.number, # issue_number: context.issue.number,
owner: context.repo.owner, # owner: context.repo.owner,
repo: context.repo.repo, # repo: context.repo.repo,
body: `### Profiling Results for code_graph_pipeline.py\n\`\`\`\n${diff || 'No differences found.'}\n\`\`\`` # body: `### Profiling Results for code_graph_pipeline.py\n\`\`\`\n${diff || 'No differences found.'}\n\`\`\``
}); # });