adapto 0.1.2__py3-none-any.whl → 0.1.3__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
adapto/scaler.py CHANGED
@@ -9,7 +9,7 @@ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(
9
9
 
10
10
 
11
11
  class AutoScaler:
12
- def __init__(self, scale_up_threshold=80, scale_down_threshold=30, memory_threshold=75,
12
+ def __init__(self, scale_up_threshold=75, scale_down_threshold=30, memory_threshold=75,
13
13
  bandwidth_threshold=100000000, min_instances=1, max_instances=10, history_size=10, custom_scaling=None):
14
14
  self.scale_up_threshold = scale_up_threshold
15
15
  self.scale_down_threshold = scale_down_threshold
@@ -20,6 +20,9 @@ class AutoScaler:
20
20
  self.max_instances = max_instances
21
21
  self.previous_network = psutil.net_io_counters()
22
22
 
23
+ # Alias for test compatibility
24
+ self.cpu_threshold = scale_up_threshold # Fix for test cases
25
+
23
26
  # Optional custom scaling function; should accept (metrics, predictions) and return 'scale_up', 'scale_down', or 'no_change'
24
27
  self.custom_scaling = custom_scaling
25
28
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: adapto
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: AI-driven auto-scaling library for dynamic resource allocation.
5
5
  Home-page: https://github.com/hrshlmeht/adapto
6
6
  Author: Harshal Mehta
@@ -0,0 +1,9 @@
1
+ adapto/__init__.py,sha256=8SWysOKRVNsD3cOXLOfIdVZx6MxzIqGKEh9Z26QuCyM,30
2
+ adapto/predictor.py,sha256=ze-cMHdf290o3_9D-PQ7yQ8eMz1Utv3E3qTHRUFQiAI,842
3
+ adapto/scaler.py,sha256=BqAs7rlIbrK4kkeBQzz3CgLHwpKWjhyQCciACqbFqTY,5654
4
+ adapto/utils.py,sha256=6TgDvowlXL__v-OkLSTZF12ZOEqEKCLuNv1LmL70eAY,140
5
+ adapto-0.1.3.dist-info/LICENSE,sha256=B73NNEiUy-CCs4zrOPlOWR39PfoG4zKtK97OnNctjvg,1070
6
+ adapto-0.1.3.dist-info/METADATA,sha256=I09ftZmmqq2srMzQ2-ITC8hBIspuVym29oI9dZXYWjQ,609
7
+ adapto-0.1.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
8
+ adapto-0.1.3.dist-info/top_level.txt,sha256=IYsgAr6fnEC1R1ztYmK2ZpFNNGV0qRaf3Tvf-R8j0cM,7
9
+ adapto-0.1.3.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- adapto/__init__.py,sha256=8SWysOKRVNsD3cOXLOfIdVZx6MxzIqGKEh9Z26QuCyM,30
2
- adapto/predictor.py,sha256=ze-cMHdf290o3_9D-PQ7yQ8eMz1Utv3E3qTHRUFQiAI,842
3
- adapto/scaler.py,sha256=qVwnjd6YondkJ_vorinmReXoO0TNf0-CiKUMvDgHYrw,5544
4
- adapto/utils.py,sha256=6TgDvowlXL__v-OkLSTZF12ZOEqEKCLuNv1LmL70eAY,140
5
- adapto-0.1.2.dist-info/LICENSE,sha256=B73NNEiUy-CCs4zrOPlOWR39PfoG4zKtK97OnNctjvg,1070
6
- adapto-0.1.2.dist-info/METADATA,sha256=c42fZm-Mw_GOCTHNpZLqQpT6jv8DaNaIxSwrvqWnUV8,609
7
- adapto-0.1.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
8
- adapto-0.1.2.dist-info/top_level.txt,sha256=IYsgAr6fnEC1R1ztYmK2ZpFNNGV0qRaf3Tvf-R8j0cM,7
9
- adapto-0.1.2.dist-info/RECORD,,
File without changes