Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aMahanna committed Dec 23, 2023
1 parent dc0e031 commit 17c4995
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ name: benchmark
on:
workflow_dispatch:
pull_request:
paths:
- "adbpyg_adapter/*.py"
- "benchmark/*.py"
push:
branches:
- master
paths:
- "src/*.py"
- "adbpyg_adapter/*.py"
- "benchmark/*.py"

jobs:
Expand Down Expand Up @@ -54,26 +57,26 @@ jobs:
- name: Echo ArangoDB to PyG
run: cat benchmark/traces/master/arangodb_to_pyg.json | jq .

# - name: Make commit for auto-generated benchmark files
# uses: EndBug/add-and-commit@v9
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# add: "./benchmark/traces/master/*.json"
# new_branch: actions/benchmark
# message: "generate benchmark files for $GITHUB_SHA"

# - name: Create pull request for the auto generated benchmark
# run: |
# echo "PR_URL=$(gh pr create \
# --title "benchmark: $GITHUB_SHA" \
# --body "beep boop, i am a robot" \
# --label documentation)" >> $GITHUB_ENV
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Make commit for auto-generated benchmark files
uses: EndBug/add-and-commit@v9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
add: "./benchmark/traces/master/*.json"
new_branch: actions/benchmark
message: "generate benchmark files for $GITHUB_SHA"

- name: Create pull request for the auto generated benchmark
run: |
echo "PR_URL=$(gh pr create \
--title "benchmark: $GITHUB_SHA" \
--body "beep boop, i am a robot ($GITHUB_SHA)" \
--label documentation)" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Alert developer of open PR
# run: echo "Benchmark $PR_URL is ready to be merged by developer."
- name: Alert developer of open PR
run: echo "Benchmark $PR_URL is ready to be merged by developer."

compare_traces:
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -137,7 +140,7 @@ jobs:
});
- name: Echo Full PyG to ArangoDB Diff
run: cat benchmark/diff/pyg_to_arangodb.json | jq .
run: cat benchmark/traces/diff/pyg_to_arangodb.json | jq .

- name: Echo Full ArangoDB to PyG Diff
run: cat benchmark/diff/arangodb_to_pyg.json | jq .
run: cat benchmark/traces/diff/arangodb_to_pyg.json | jq .
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ tests/data/pyg

# "Current" Benchmark Results
benchmark/traces/branch/*.json
benchmark/diff/*.json
benchmark/traces/diff/*.json
2 changes: 1 addition & 1 deletion benchmark/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def main():
branch_trace = json.load(open(f"{current_dir}/traces/branch/{operation}.json"))
diff_trace = compare_traces(master_trace, branch_trace)

with open(f"{current_dir}/diff/{operation}.json", "w") as file:
with open(f"{current_dir}/traces/diff/{operation}.json", "w") as file:
file.write(json.dumps(diff_trace, indent=4))

root_span_diffs[operation] = {
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions benchmark/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
from retry import retry
from torch_geometric.datasets import FakeHeteroDataset

# import uuid


try:
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
except ImportError:
Expand Down

0 comments on commit 17c4995

Please sign in to comment.