service-capacity-modeling 0.3.97__py3-none-any.whl → 0.3.99__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- service_capacity_modeling/interface.py +25 -1
- {service_capacity_modeling-0.3.97.dist-info → service_capacity_modeling-0.3.99.dist-info}/METADATA +1 -1
- {service_capacity_modeling-0.3.97.dist-info → service_capacity_modeling-0.3.99.dist-info}/RECORD +7 -7
- {service_capacity_modeling-0.3.97.dist-info → service_capacity_modeling-0.3.99.dist-info}/WHEEL +1 -1
- {service_capacity_modeling-0.3.97.dist-info → service_capacity_modeling-0.3.99.dist-info}/entry_points.txt +0 -0
- {service_capacity_modeling-0.3.97.dist-info → service_capacity_modeling-0.3.99.dist-info}/licenses/LICENSE +0 -0
- {service_capacity_modeling-0.3.97.dist-info → service_capacity_modeling-0.3.99.dist-info}/top_level.txt +0 -0
|
@@ -1064,12 +1064,36 @@ class CapacityDesires(ExcludeUnsetModel):
|
|
|
1064
1064
|
.get("estimated_state_size_gib", None)
|
|
1065
1065
|
)
|
|
1066
1066
|
user_count = self.data_shape.estimated_state_item_count
|
|
1067
|
-
|
|
1067
|
+
|
|
1068
|
+
# Bidirectional inference: state_size_gib ↔ item_count
|
|
1069
|
+
#
|
|
1070
|
+
# Users often know one but not the other. We can infer the missing value:
|
|
1071
|
+
# state_size_gib = item_count × item_size_bytes
|
|
1072
|
+
# item_count = state_size_gib / item_size_bytes
|
|
1073
|
+
#
|
|
1074
|
+
# Item size comes from write_size (the size of records written to storage).
|
|
1075
|
+
# For read-only workloads (e.g., read replicas), use read_size as fallback.
|
|
1076
|
+
# If user provided both or neither, no inference is needed.
|
|
1077
|
+
item_size_bytes = (
|
|
1078
|
+
desires.query_pattern.estimated_mean_write_size_bytes.mid
|
|
1079
|
+
or desires.query_pattern.estimated_mean_read_size_bytes.mid
|
|
1080
|
+
)
|
|
1081
|
+
|
|
1068
1082
|
if user_size is None and user_count is not None:
|
|
1083
|
+
if not item_size_bytes:
|
|
1084
|
+
raise ValueError(
|
|
1085
|
+
"Model default_desires() must set estimated_mean_write_size_bytes "
|
|
1086
|
+
"or estimated_mean_read_size_bytes to infer state_size_gib"
|
|
1087
|
+
)
|
|
1069
1088
|
desires.data_shape.estimated_state_size_gib = user_count.scale(
|
|
1070
1089
|
factor=(item_size_bytes / GIB_IN_BYTES)
|
|
1071
1090
|
)
|
|
1072
1091
|
elif user_size is not None and user_count is None:
|
|
1092
|
+
if not item_size_bytes:
|
|
1093
|
+
raise ValueError(
|
|
1094
|
+
"Model default_desires() must set estimated_mean_write_size_bytes "
|
|
1095
|
+
"or estimated_mean_read_size_bytes to infer item_count"
|
|
1096
|
+
)
|
|
1073
1097
|
user_size_gib = self.data_shape.estimated_state_size_gib
|
|
1074
1098
|
desires.data_shape.estimated_state_item_count = user_size_gib.scale(
|
|
1075
1099
|
factor=(GIB_IN_BYTES / item_size_bytes)
|
{service_capacity_modeling-0.3.97.dist-info → service_capacity_modeling-0.3.99.dist-info}/RECORD
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
service_capacity_modeling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
service_capacity_modeling/capacity_planner.py,sha256=JRagEFlg3u_zB1N5GzGsKAN55JZLad6p4IF_PmL8kcg,32780
|
|
3
3
|
service_capacity_modeling/enum_utils.py,sha256=50Rw2kgYoJYCrybSbo9WaPPCWxlF5CyPCQtHxQ3kB18,5229
|
|
4
|
-
service_capacity_modeling/interface.py,sha256=
|
|
4
|
+
service_capacity_modeling/interface.py,sha256=jTuMoMc6XEbMl859YNAwV9RiEgJf4phe6g1qHp7_kNg,43453
|
|
5
5
|
service_capacity_modeling/stats.py,sha256=LCNUcQPfwF5hhIZwsfAsDe4ZbnuhDnl3vQHKfpK61Xc,6142
|
|
6
6
|
service_capacity_modeling/hardware/__init__.py,sha256=P5ostvoSOMUqPODtepeFYb4qfTVH0E73mMFraP49rYU,9196
|
|
7
7
|
service_capacity_modeling/hardware/profiles/__init__.py,sha256=7-y3JbCBkgzaAjFla2RIymREcImdZ51HTl3yn3vzoGw,1602
|
|
@@ -82,9 +82,9 @@ service_capacity_modeling/tools/auto_shape.py,sha256=K248-DayPrcZwLw1dYr47lpeQQw
|
|
|
82
82
|
service_capacity_modeling/tools/fetch_pricing.py,sha256=fO84h77cqiiIHF4hZt490RwbZ6JqjB45UsnPpV2AXD4,6122
|
|
83
83
|
service_capacity_modeling/tools/generate_missing.py,sha256=F7YqvMJAV4nZc20GNrlIsnQSF8_77sLgwYZqc5k4LDg,3099
|
|
84
84
|
service_capacity_modeling/tools/instance_families.py,sha256=e5RuYkCLUITvsAazDH12B6KjX_PaBsv6Ne3mj0HK_sQ,9223
|
|
85
|
-
service_capacity_modeling-0.3.
|
|
86
|
-
service_capacity_modeling-0.3.
|
|
87
|
-
service_capacity_modeling-0.3.
|
|
88
|
-
service_capacity_modeling-0.3.
|
|
89
|
-
service_capacity_modeling-0.3.
|
|
90
|
-
service_capacity_modeling-0.3.
|
|
85
|
+
service_capacity_modeling-0.3.99.dist-info/licenses/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
|
|
86
|
+
service_capacity_modeling-0.3.99.dist-info/METADATA,sha256=qxKT3t31WfU-qh6QPhnR3Fdnwz_EkjkZhJLp-VmqHY4,10366
|
|
87
|
+
service_capacity_modeling-0.3.99.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
88
|
+
service_capacity_modeling-0.3.99.dist-info/entry_points.txt,sha256=ZsjzpG5SomWpT1zCE19n1uSXKH2gTI_yc33sdl0vmJg,146
|
|
89
|
+
service_capacity_modeling-0.3.99.dist-info/top_level.txt,sha256=H8XjTCLgR3enHq5t3bIbxt9SeUkUT8HT_SDv2dgIT_A,26
|
|
90
|
+
service_capacity_modeling-0.3.99.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|