Add cartesian and hash join mgbench (#1393)
This commit is contained in:
parent
4e8148f7d9
commit
fdf63436ab
8
.github/workflows/daily_benchmark.yaml
vendored
8
.github/workflows/daily_benchmark.yaml
vendored
@ -73,6 +73,8 @@ jobs:
|
|||||||
|
|
||||||
./benchmark.py vendor-native --num-workers-for-benchmark 1 --export-results benchmark_high_write_set_property.json high_write_set_property
|
./benchmark.py vendor-native --num-workers-for-benchmark 1 --export-results benchmark_high_write_set_property.json high_write_set_property
|
||||||
|
|
||||||
|
./benchmark.py vendor-native --num-workers-for-benchmark 12 --export-results cartesian.json cartesian
|
||||||
|
|
||||||
- name: Upload mgbench results
|
- name: Upload mgbench results
|
||||||
run: |
|
run: |
|
||||||
cd tools/bench-graph-client
|
cd tools/bench-graph-client
|
||||||
@ -96,3 +98,9 @@ jobs:
|
|||||||
--github-run-id "${{ github.run_id }}" \
|
--github-run-id "${{ github.run_id }}" \
|
||||||
--github-run-number "${{ github.run_number }}" \
|
--github-run-number "${{ github.run_number }}" \
|
||||||
--head-branch-name "${{ env.BRANCH_NAME }}"
|
--head-branch-name "${{ env.BRANCH_NAME }}"
|
||||||
|
|
||||||
|
./main.py --benchmark-name "cartesian" \
|
||||||
|
--benchmark-results-path "../../tests/mgbench/cartesian.json" \
|
||||||
|
--github-run-id "${{ github.run_id }}" \
|
||||||
|
--github-run-number "${{ github.run_number }}" \
|
||||||
|
--head-branch-name "${{ env.BRANCH_NAME }}"
|
||||||
|
@ -52,6 +52,8 @@ jobs:
|
|||||||
|
|
||||||
./benchmark.py vendor-native --num-workers-for-benchmark 1 --export-results benchmark_high_write_set_property.json high_write_set_property
|
./benchmark.py vendor-native --num-workers-for-benchmark 1 --export-results benchmark_high_write_set_property.json high_write_set_property
|
||||||
|
|
||||||
|
./benchmark.py vendor-native --num-workers-for-benchmark 12 --export-results benchmark_cartesian.json cartesian
|
||||||
|
|
||||||
- name: Upload benchmark results
|
- name: Upload benchmark results
|
||||||
run: |
|
run: |
|
||||||
cd tools/bench-graph-client
|
cd tools/bench-graph-client
|
||||||
@ -75,3 +77,9 @@ jobs:
|
|||||||
--github-run-id "${{ github.run_id }}" \
|
--github-run-id "${{ github.run_id }}" \
|
||||||
--github-run-number "${{ github.run_number }}" \
|
--github-run-number "${{ github.run_number }}" \
|
||||||
--head-branch-name "${{ env.BRANCH_NAME }}"
|
--head-branch-name "${{ env.BRANCH_NAME }}"
|
||||||
|
|
||||||
|
./main.py --benchmark-name "cartesian" \
|
||||||
|
--benchmark-results-path "../../tests/mgbench/cartesian.json" \
|
||||||
|
--github-run-id "${{ github.run_id }}" \
|
||||||
|
--github-run-number "${{ github.run_number }}" \
|
||||||
|
--head-branch-name "${{ env.BRANCH_NAME }}"
|
||||||
|
39
tests/mgbench/workloads/cartesian.py
Normal file
39
tests/mgbench/workloads/cartesian.py
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# Copyright 2023 Memgraph Ltd.
|
||||||
|
#
|
||||||
|
# Use of this software is governed by the Business Source License
|
||||||
|
# included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
||||||
|
# License, and you may not use this file except in compliance with the Business Source License.
|
||||||
|
#
|
||||||
|
# As of the Change Date specified in that file, in accordance with
|
||||||
|
# the Business Source License, use of this software will be governed
|
||||||
|
# by the Apache License, Version 2.0, included in the file
|
||||||
|
# licenses/APL.txt.
|
||||||
|
|
||||||
|
from workloads.base import Workload
|
||||||
|
|
||||||
|
|
||||||
|
class Supernode(Workload):
|
||||||
|
NAME = "cartesian"
|
||||||
|
CARDINALITY = 1000
|
||||||
|
|
||||||
|
def indexes_generator(self):
|
||||||
|
return [
|
||||||
|
("CREATE INDEX ON :Node;", {}),
|
||||||
|
("CREATE INDEX ON :Node(id);", {}),
|
||||||
|
]
|
||||||
|
|
||||||
|
def dataset_generator(self):
|
||||||
|
queries = []
|
||||||
|
for i in range(0, Supernode.CARDINALITY):
|
||||||
|
queries.append(("CREATE (:Node {id: $id, id2: $id});", {"id": i, "id2": i}))
|
||||||
|
|
||||||
|
return queries
|
||||||
|
|
||||||
|
def benchmark__test__plain_cartesian_filtering(self):
|
||||||
|
return ("MATCH (n1:Node), (n2:Node) WHERE n1.id < 100 and n2.id < 100 RETURN n1, n2;", {})
|
||||||
|
|
||||||
|
def benchmark__test__plain_cartesian_join(self):
|
||||||
|
return ("MATCH (n1:Node), (n2:Node) WHERE n1.id = n2.id RETURN n1, n2;", {})
|
||||||
|
|
||||||
|
def benchmark__test__plain_cartesian_different_props_join(self):
|
||||||
|
return ("MATCH (n1:Node), (n2:Node) WHERE n1.id = n2.id2 RETURN n1, n2;", {})
|
Loading…
Reference in New Issue
Block a user