Skip to content

Commit

Permalink
test to validate merge of derived buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushis committed Mar 4, 2025
1 parent 36a98e2 commit 902dd19
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_desire_merge.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from service_capacity_modeling.capacity_planner import planner
from service_capacity_modeling.interface import Buffer
from service_capacity_modeling.interface import Buffer, BufferIntent
from service_capacity_modeling.interface import BufferComponent
from service_capacity_modeling.interface import Buffers
from service_capacity_modeling.interface import CapacityDesires
Expand All @@ -25,6 +25,9 @@
desired={
"custom": Buffer(ratio=3.8, components=["custom"]),
"custom-cpu": Buffer(ratio=3.0, components=[BufferComponent.cpu]),
},
derived={
"compute": Buffer(intent=BufferIntent.scale, ratio=2, components=["compute"])
}
),
)
Expand All @@ -41,6 +44,9 @@ def test_cassandra_merge():
assert merged.query_pattern.estimated_read_per_second.mid == 100000
assert merged.query_pattern.estimated_mean_read_size_bytes.low == 10
assert merged.data_shape.estimated_state_size_gib.mid == 10
assert merged.buffers.derived.get("compute") is not None
assert merged.buffers.derived["compute"].ratio == 2.0
assert merged.buffers.derived["compute"].intent == BufferIntent.scale

# Should come from cassandra model
assert merged.query_pattern.estimated_mean_read_latency_ms.mid == 2.0
Expand Down

0 comments on commit 902dd19

Please sign in to comment.