Compare commits

...

5 Commits

Author SHA1 Message Date
Ivan Milinović
cf31496b0f Merge branch 'master' into orderby-workload 2024-01-12 10:42:30 +01:00
Ivan Milinović
1f5a6e5057 Merge branch 'master' into orderby-workload 2024-01-11 16:02:01 +01:00
Ivan Milinović
115e7d87fc Merge branch 'master' into orderby-workload 2024-01-11 10:26:23 +01:00
Ivan Milinović
067387df10 Merge branch 'master' into orderby-workload 2024-01-10 00:11:48 +01:00
imilinovic
646fd8b6da order by workload 2023-12-20 11:17:18 +01:00
2 changed files with 54 additions and 0 deletions

View File

@@ -75,6 +75,8 @@ jobs:
./benchmark.py vendor-native --num-workers-for-benchmark 12 --export-results cartesian.json cartesian
./benchmark.py vendor-native --num-workers-for-benchmark 12 --export-results order_by.json order_by
- name: Upload mgbench results
run: |
cd tools/bench-graph-client
@@ -104,3 +106,9 @@ jobs:
--github-run-id "${{ github.run_id }}" \
--github-run-number "${{ github.run_number }}" \
--head-branch-name "${{ env.BRANCH_NAME }}"
./main.py --benchmark-name "order_by" \
--benchmark-results "../../tests/mgbench/order_by.json" \
--github-run-id "${{ github.run_id }}" \
--github-run-number "${{ github.run_number }}" \
--head-branch-name "${{ env.BRANCH_NAME }}"

View File

@@ -0,0 +1,46 @@
# 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 OrderBy(Workload):
NAME = "order_by"
CARDINALITY = 10000
def indexes_generator(self):
return [
("CREATE INDEX ON :Node;", {}),
("CREATE INDEX ON :Node(prop1);", {}),
("CREATE INDEX ON :Node(prop2);", {}),
("CREATE INDEX ON :Node(prop3);", {}),
]
def dataset_generator(self):
queries = []
for i in range(0, OrderBy.CARDINALITY):
queries.append(
(
"""CREATE
(:Node {prop1: $id, prop2: $id, prop3: $id
});
""",
{"id": i},
)
)
return queries
def benchmark__test__order_by(self):
return (
"MATCH (n:Node) RETURN n ORDER BY n.prop1",
{},
)