Skip to content

Commit

Permalink
remove single sensor updating workload
Browse files Browse the repository at this point in the history
The other workload is much larger and plausibly much better at
reproducing the issue
  • Loading branch information
benesch committed Dec 31, 2024
1 parent 5cb7b41 commit af9a041
Showing 1 changed file with 0 additions and 151 deletions.
151 changes: 0 additions & 151 deletions misc/python/materialize/data_ingest/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,75 +59,6 @@ def generate(self, fields: list[Field]) -> Iterator[Transaction]:
yield transaction


class SingleSensorUpdating(Workload):
def __init__(
self,
composition: Composition | None = None,
mz_service: str = "materialized",
deploy_generation: int = 0,
) -> None:
super().__init__(mz_service, deploy_generation)
self.cycle = [
TransactionDef(
[
Upsert(
keyspace=Keyspace.SINGLE_VALUE,
count=Records.ONE,
record_size=RecordSize.SMALL,
)
]
)
]


class SingleSensorUpdatingDisruptions(Workload):
def __init__(
self,
composition: Composition | None = None,
mz_service: str = "materialized",
deploy_generation: int = 0,
) -> None:
super().__init__(mz_service, deploy_generation)
self.cycle = [
TransactionDef(
[
Upsert(
keyspace=Keyspace.SINGLE_VALUE,
count=Records.ONE,
record_size=RecordSize.SMALL,
),
]
),
]
if composition:
self.cycle.append(RestartMz(composition, probability=0.1, workload=self))


class SingleSensorUpdating0dtDeploy(Workload):
def __init__(
self,
composition: Composition | None = None,
mz_service: str = "materialized",
deploy_generation: int = 0,
) -> None:
super().__init__(mz_service, deploy_generation)
self.cycle = [
TransactionDef(
[
Upsert(
keyspace=Keyspace.SINGLE_VALUE,
count=Records.ONE,
record_size=RecordSize.SMALL,
),
]
),
]
if composition:
self.cycle.append(
ZeroDowntimeDeploy(composition, probability=0.1, workload=self)
)


class DeleteDataAtEndOfDay(Workload):
def __init__(
self,
Expand Down Expand Up @@ -160,88 +91,6 @@ def __init__(
]


class DeleteDataAtEndOfDayDisruptions(Workload):
def __init__(
self,
composition: Composition | None = None,
mz_service: str = "materialized",
deploy_generation: int = 0,
) -> None:
super().__init__(mz_service, deploy_generation)
insert = Insert(
count=Records.SOME,
record_size=RecordSize.SMALL,
)
insert_phase = TransactionDef(
size=TransactionSize.HUGE,
operations=[insert],
)
# Delete all records in a single transaction
delete_phase = TransactionDef(
[
Delete(
number_of_records=Records.ALL,
record_size=RecordSize.SMALL,
num=insert.max_key(),
)
]
)
self.cycle = [
insert_phase,
delete_phase,
]

if composition:
self.cycle.append(RestartMz(composition, probability=0.1, workload=self))


class DeleteDataAtEndOfDay0dtDeploys(Workload):
def __init__(
self,
composition: Composition | None = None,
mz_service: str = "materialized",
deploy_generation: int = 0,
) -> None:
super().__init__(mz_service, deploy_generation)
insert = Insert(
count=Records.SOME,
record_size=RecordSize.SMALL,
)
insert_phase = TransactionDef(
size=TransactionSize.HUGE,
operations=[insert],
)
# Delete all records in a single transaction
delete_phase = TransactionDef(
[
Delete(
number_of_records=Records.ALL,
record_size=RecordSize.SMALL,
num=insert.max_key(),
)
]
)
self.cycle = [
insert_phase,
delete_phase,
]

if composition:
self.cycle.append(
ZeroDowntimeDeploy(composition, probability=0.1, workload=self)
)


# TODO: Implement
# class ProgressivelyEnrichRecords(Workload):
# def __init__(
# self, composition: Composition | None = None, mz_service: str = "materialized", deploy_generation: int = 0
# ) -> None:
# super().__init__(mz_service, deploy_generation)
# self.cycle: list[Definition] = [
# ]


WORKLOADS = all_subclasses(Workload)


Expand Down

0 comments on commit af9a041

Please sign in to comment.