Skip to content

Commit

Permalink
Fix item count bug
Browse files Browse the repository at this point in the history
  • Loading branch information
akashdeepgoel committed Oct 11, 2023
1 parent c4076f3 commit 2fb0c49
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion service_capacity_modeling/models/org/netflix/evcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ def _estimate_evcache_requirement(
item_count = desires.data_shape.estimated_state_item_count
payload_greater_than_classic = False
if state_size is not None and item_count is not None:
payload_size = (state_size.mid * 1024.0 * 1024.0 * 1024.0) / (item_count.mid)
if item_count.mid != 0:
payload_size = (state_size.mid * 1024.0 * 1024.0 * 1024.0) / (item_count.mid)
else:
payload_size = 0.0

if payload_size > 200.0:
payload_greater_than_classic = True

Expand Down

0 comments on commit 2fb0c49

Please sign in to comment.