Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully using new workspace #67

Merged
merged 24 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ed21a60
added (failing) test for test_tpch_data
wangpatrick57 Dec 29, 2024
91a6db3
wrote and passed test_tpch_data
wangpatrick57 Dec 29, 2024
0f00113
tpch data -> tables
wangpatrick57 Dec 29, 2024
74c32e2
now passing test_tpch_workload
wangpatrick57 Dec 29, 2024
8c2c4ac
added and passed test_job_tables
wangpatrick57 Dec 29, 2024
86f62eb
wrote and passed test_job_workload
wangpatrick57 Dec 29, 2024
883b183
fixed bug in workspace where it would always sleep for 1 second
wangpatrick57 Dec 29, 2024
664728d
can now run integtest_benchmark.py fully
wangpatrick57 Dec 29, 2024
e4235fe
gymlib integtests no longer crash when run together with other integt…
wangpatrick57 Dec 29, 2024
c430a90
fixed some paths in gymlib integtests
wangpatrick57 Dec 30, 2024
e0cde22
added and passed test_postgres_build
wangpatrick57 Dec 30, 2024
9d111d3
added and passed test_postgres_dbdata
wangpatrick57 Dec 30, 2024
85f40a0
now passing all integtests
wangpatrick57 Dec 30, 2024
395a6f8
fordpath/fpath/dpath -> path
wangpatrick57 Dec 30, 2024
1dcf669
dbms integtest now uses intended_dbdata_hardware
wangpatrick57 Dec 30, 2024
b5fd76e
fully removed the old open_and_save, save_file, and link_result
wangpatrick57 Dec 30, 2024
49364c9
num_times_created_this_run -> _num_times_created_this_run
wangpatrick57 Dec 30, 2024
2ffa8c7
rm lab.py
wangpatrick57 Dec 30, 2024
17f89ff
deleted all the cur_* functions from workspace fixed all uses of them
wangpatrick57 Dec 30, 2024
e3ac705
deleted append_group
wangpatrick57 Dec 30, 2024
f5c89e7
deleted more functions from workspace.py
wangpatrick57 Dec 30, 2024
e6ed566
refactored everything to use linkname helpers
wangpatrick57 Dec 30, 2024
388aeec
refactored how workspace works in gymlib tests
wangpatrick57 Dec 30, 2024
e3f7bfe
now resetting num times created in integtests
wangpatrick57 Dec 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tpch data -> tables
  • Loading branch information
wangpatrick57 committed Dec 29, 2024
commit 0f00113161e15704caa01e1117efa9b1667daeeb
6 changes: 3 additions & 3 deletions benchmark/tests/integtest_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from gymlib.symlinks_paths import get_tables_symlink_path

# It's ok to import private functions from the benchmark module because this is an integration test.
from benchmark.tpch.cli import _tpch_data
from benchmark.tpch.cli import _tpch_tables
from util.workspace import DBGymWorkspace, get_workspace_path_from_config


Expand All @@ -21,13 +21,13 @@ def setUp(self) -> None:
# def tearDown(self) -> None:
# shutil.rmtree(self.workspace.dbgym_workspace_path)

def test_tpch_data(self) -> None:
def test_tpch_tables(self) -> None:
scale_factor = 0.01
tables_path = get_tables_symlink_path(
self.workspace.dbgym_workspace_path, "tpch", scale_factor
)
self.assertFalse(tables_path.exists())
_tpch_data(self.workspace, scale_factor)
_tpch_tables(self.workspace, scale_factor)
self.assertTrue(tables_path.exists())


Expand Down
15 changes: 7 additions & 8 deletions benchmark/tpch/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
from pathlib import Path

import click
from gymlib.symlinks_paths import get_tables_dirname, get_tables_symlink_path
Expand All @@ -25,21 +24,21 @@ def tpch_group(dbgym_workspace: DBGymWorkspace) -> None:
dbgym_workspace.append_group("tpch")


@tpch_group.command(name="data")
@tpch_group.command(name="tables")
@click.argument("scale-factor", type=float)
@click.pass_obj
# The reason generate data is separate from create dbdata is because generate-data is generic
# The reason generate tables is separate from create dbdata is because tpch_tables is generic
# to all DBMSs while create dbdata is specific to a single DBMS.
def tpch_data(dbgym_workspace: DBGymWorkspace, scale_factor: float) -> None:
_tpch_data(dbgym_workspace, scale_factor)
def tpch_tables(dbgym_workspace: DBGymWorkspace, scale_factor: float) -> None:
_tpch_tables(dbgym_workspace, scale_factor)


def _tpch_data(dbgym_workspace: DBGymWorkspace, scale_factor: float) -> None:
def _tpch_tables(dbgym_workspace: DBGymWorkspace, scale_factor: float) -> None:
"""
This function exists as a hook for integration tests.
"""
_clone_tpch_kit(dbgym_workspace)
_generate_data(dbgym_workspace, scale_factor)
_generate_tpch_tables(dbgym_workspace, scale_factor)


@tpch_group.command(name="workload")
Expand Down Expand Up @@ -139,7 +138,7 @@ def _generate_tpch_queries(
)


def _generate_data(dbgym_workspace: DBGymWorkspace, scale_factor: float) -> None:
def _generate_tpch_tables(dbgym_workspace: DBGymWorkspace, scale_factor: float) -> None:
tpch_kit_dpath = dbgym_workspace.dbgym_cur_symlinks_path / (
TPCH_KIT_DIRNAME + ".link"
)
Expand Down