vnai 2.0.8__tar.gz → 2.1.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vnai
3
- Version: 2.0.8
3
+ Version: 2.1.0
4
4
  Summary: System optimization and resource management toolkit
5
5
  Author-email: Vnstock HQ <support@vnstocks.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "vnai"
7
- version = "2.0.8"
7
+ version = "2.1.0"
8
8
  description = "System optimization and resource management toolkit"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
@@ -11,13 +11,14 @@ _B=None
11
11
  _A='function'
12
12
  import sys,time,threading
13
13
  from datetime import datetime
14
+ import hashlib,json
14
15
  class Collector:
15
16
  _instance=_B;_lock=threading.Lock()
16
17
  def __new__(cls):
17
18
  with cls._lock:
18
19
  if cls._instance is _B:cls._instance=super(Collector,cls).__new__(cls);cls._instance._initialize()
19
20
  return cls._instance
20
- def _initialize(self):self.metrics={_A:[],_H:[],_I:[],_D:[]};self.thresholds={_J:50,'error_threshold':.1,'performance_threshold':5.};self.function_count=0;self.colab_auth_triggered=_E;self.max_metric_length=200
21
+ def _initialize(self):self.metrics={_A:[],_H:[],_I:[],_D:[]};self.thresholds={_J:50,'error_threshold':.1,'performance_threshold':5.};self.function_count=0;self.colab_auth_triggered=_E;self.max_metric_length=200;self._last_record_time={};self.min_interval_per_type=.5
21
22
  def record(self,metric_type,data,priority=_B):
22
23
  A='high'
23
24
  if not isinstance(data,dict):data={'value':str(data)}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vnai
3
- Version: 2.0.8
3
+ Version: 2.1.0
4
4
  Summary: System optimization and resource management toolkit
5
5
  Author-email: Vnstock HQ <support@vnstocks.com>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes