exonware-xwlazy 0.1.0.22__py3-none-any.whl → 1.0.1.2__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.
- exonware/__init__.py +86 -16
- exonware/xwlazy/version.py +5 -5
- exonware/xwlazy.py +2546 -0
- exonware/xwlazy_external_libs.toml +716 -0
- {exonware_xwlazy-0.1.0.22.dist-info → exonware_xwlazy-1.0.1.2.dist-info}/METADATA +6 -6
- exonware_xwlazy-1.0.1.2.dist-info/RECORD +8 -0
- exonware/xwlazy/__init__.py +0 -367
- exonware/xwlazy/common/__init__.py +0 -47
- exonware/xwlazy/common/base.py +0 -56
- exonware/xwlazy/common/cache.py +0 -504
- exonware/xwlazy/common/logger.py +0 -257
- exonware/xwlazy/common/services/__init__.py +0 -72
- exonware/xwlazy/common/services/dependency_mapper.py +0 -232
- exonware/xwlazy/common/services/install_async_utils.py +0 -165
- exonware/xwlazy/common/services/install_cache_utils.py +0 -245
- exonware/xwlazy/common/services/keyword_detection.py +0 -283
- exonware/xwlazy/common/services/spec_cache.py +0 -165
- exonware/xwlazy/common/services/state_manager.py +0 -84
- exonware/xwlazy/common/strategies/__init__.py +0 -28
- exonware/xwlazy/common/strategies/caching_dict.py +0 -44
- exonware/xwlazy/common/strategies/caching_installation.py +0 -88
- exonware/xwlazy/common/strategies/caching_lfu.py +0 -66
- exonware/xwlazy/common/strategies/caching_lru.py +0 -63
- exonware/xwlazy/common/strategies/caching_multitier.py +0 -59
- exonware/xwlazy/common/strategies/caching_ttl.py +0 -59
- exonware/xwlazy/config.py +0 -193
- exonware/xwlazy/contracts.py +0 -1396
- exonware/xwlazy/defs.py +0 -378
- exonware/xwlazy/errors.py +0 -276
- exonware/xwlazy/facade.py +0 -991
- exonware/xwlazy/module/__init__.py +0 -18
- exonware/xwlazy/module/base.py +0 -565
- exonware/xwlazy/module/data.py +0 -17
- exonware/xwlazy/module/facade.py +0 -246
- exonware/xwlazy/module/importer_engine.py +0 -2117
- exonware/xwlazy/module/strategies/__init__.py +0 -22
- exonware/xwlazy/module/strategies/module_helper_lazy.py +0 -93
- exonware/xwlazy/module/strategies/module_helper_simple.py +0 -65
- exonware/xwlazy/module/strategies/module_manager_advanced.py +0 -111
- exonware/xwlazy/module/strategies/module_manager_simple.py +0 -95
- exonware/xwlazy/package/__init__.py +0 -18
- exonware/xwlazy/package/base.py +0 -798
- exonware/xwlazy/package/conf.py +0 -324
- exonware/xwlazy/package/data.py +0 -17
- exonware/xwlazy/package/facade.py +0 -480
- exonware/xwlazy/package/services/__init__.py +0 -84
- exonware/xwlazy/package/services/async_install_handle.py +0 -87
- exonware/xwlazy/package/services/config_manager.py +0 -245
- exonware/xwlazy/package/services/discovery.py +0 -370
- exonware/xwlazy/package/services/host_packages.py +0 -145
- exonware/xwlazy/package/services/install_async.py +0 -277
- exonware/xwlazy/package/services/install_cache.py +0 -145
- exonware/xwlazy/package/services/install_interactive.py +0 -59
- exonware/xwlazy/package/services/install_policy.py +0 -156
- exonware/xwlazy/package/services/install_registry.py +0 -54
- exonware/xwlazy/package/services/install_result.py +0 -17
- exonware/xwlazy/package/services/install_sbom.py +0 -153
- exonware/xwlazy/package/services/install_utils.py +0 -79
- exonware/xwlazy/package/services/installer_engine.py +0 -406
- exonware/xwlazy/package/services/lazy_installer.py +0 -718
- exonware/xwlazy/package/services/manifest.py +0 -496
- exonware/xwlazy/package/services/strategy_registry.py +0 -186
- exonware/xwlazy/package/strategies/__init__.py +0 -57
- exonware/xwlazy/package/strategies/package_discovery_file.py +0 -129
- exonware/xwlazy/package/strategies/package_discovery_hybrid.py +0 -84
- exonware/xwlazy/package/strategies/package_discovery_manifest.py +0 -101
- exonware/xwlazy/package/strategies/package_execution_async.py +0 -113
- exonware/xwlazy/package/strategies/package_execution_cached.py +0 -90
- exonware/xwlazy/package/strategies/package_execution_pip.py +0 -99
- exonware/xwlazy/package/strategies/package_execution_wheel.py +0 -106
- exonware/xwlazy/package/strategies/package_mapping_discovery_first.py +0 -100
- exonware/xwlazy/package/strategies/package_mapping_hybrid.py +0 -105
- exonware/xwlazy/package/strategies/package_mapping_manifest_first.py +0 -100
- exonware/xwlazy/package/strategies/package_policy_allow_list.py +0 -57
- exonware/xwlazy/package/strategies/package_policy_deny_list.py +0 -57
- exonware/xwlazy/package/strategies/package_policy_permissive.py +0 -46
- exonware/xwlazy/package/strategies/package_timing_clean.py +0 -67
- exonware/xwlazy/package/strategies/package_timing_full.py +0 -66
- exonware/xwlazy/package/strategies/package_timing_smart.py +0 -68
- exonware/xwlazy/package/strategies/package_timing_temporary.py +0 -66
- exonware/xwlazy/runtime/__init__.py +0 -18
- exonware/xwlazy/runtime/adaptive_learner.py +0 -129
- exonware/xwlazy/runtime/base.py +0 -274
- exonware/xwlazy/runtime/facade.py +0 -94
- exonware/xwlazy/runtime/intelligent_selector.py +0 -170
- exonware/xwlazy/runtime/metrics.py +0 -60
- exonware/xwlazy/runtime/performance.py +0 -37
- exonware_xwlazy-0.1.0.22.dist-info/RECORD +0 -87
- {exonware_xwlazy-0.1.0.22.dist-info → exonware_xwlazy-1.0.1.2.dist-info}/WHEEL +0 -0
- {exonware_xwlazy-0.1.0.22.dist-info → exonware_xwlazy-1.0.1.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Runtime Services Facade
|
|
3
|
-
|
|
4
|
-
Main facade: XWRuntimeHelper extends ARuntimeHelper
|
|
5
|
-
Provides concrete implementation for all runtime services.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from typing import Dict, List, Optional, Tuple, Any
|
|
9
|
-
from .base import ARuntimeHelper
|
|
10
|
-
from ..defs import LazyLoadMode, LazyInstallMode
|
|
11
|
-
|
|
12
|
-
class XWRuntimeHelper(ARuntimeHelper):
|
|
13
|
-
"""
|
|
14
|
-
Concrete implementation of ARuntimeHelper.
|
|
15
|
-
|
|
16
|
-
Provides runtime services for state management, learning, monitoring, and caching.
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
def __init__(self):
|
|
20
|
-
"""Initialize XW runtime services."""
|
|
21
|
-
super().__init__()
|
|
22
|
-
|
|
23
|
-
# Abstract methods from ARuntime that need implementation
|
|
24
|
-
def record_import(self, module_name: str, import_time: float) -> None:
|
|
25
|
-
"""Record an import event."""
|
|
26
|
-
# TODO: Implement import recording
|
|
27
|
-
pass
|
|
28
|
-
|
|
29
|
-
def predict_next_imports(self, current_module: str, count: int = 3) -> List[str]:
|
|
30
|
-
"""Predict next likely imports based on patterns."""
|
|
31
|
-
# TODO: Implement prediction logic
|
|
32
|
-
return []
|
|
33
|
-
|
|
34
|
-
def get_module_score(self, module_name: str) -> float:
|
|
35
|
-
"""Get priority score for a module."""
|
|
36
|
-
# TODO: Implement scoring logic
|
|
37
|
-
return 0.0
|
|
38
|
-
|
|
39
|
-
def detect_load_level(
|
|
40
|
-
self,
|
|
41
|
-
module_count: int = 0,
|
|
42
|
-
total_import_time: float = 0.0,
|
|
43
|
-
import_count: int = 0,
|
|
44
|
-
memory_usage_mb: float = 0.0
|
|
45
|
-
):
|
|
46
|
-
"""Detect current load level."""
|
|
47
|
-
# TODO: Implement load level detection
|
|
48
|
-
from .intelligent_selector import LoadLevel
|
|
49
|
-
return LoadLevel.LIGHT
|
|
50
|
-
|
|
51
|
-
def get_optimal_mode(self, load_level) -> Tuple[LazyLoadMode, LazyInstallMode]:
|
|
52
|
-
"""Get optimal mode for a load level."""
|
|
53
|
-
# TODO: Implement mode selection
|
|
54
|
-
return LazyLoadMode.AUTO, LazyInstallMode.SMART
|
|
55
|
-
|
|
56
|
-
def update_mode_map(self, mode_map: Dict[Any, Tuple[LazyLoadMode, LazyInstallMode]]) -> None:
|
|
57
|
-
"""Update mode mapping with benchmark results."""
|
|
58
|
-
# TODO: Implement mode map update
|
|
59
|
-
pass
|
|
60
|
-
|
|
61
|
-
def get_metric_stats(self, name: str) -> Dict[str, Any]:
|
|
62
|
-
"""Get statistics for a metric."""
|
|
63
|
-
with self._lock:
|
|
64
|
-
values = self._metrics.get(name, [])
|
|
65
|
-
if not values:
|
|
66
|
-
return {'count': 0, 'total': 0.0, 'average': 0.0, 'min': 0.0, 'max': 0.0}
|
|
67
|
-
return {
|
|
68
|
-
'count': len(values),
|
|
69
|
-
'total': sum(values),
|
|
70
|
-
'average': sum(values) / len(values),
|
|
71
|
-
'min': min(values),
|
|
72
|
-
'max': max(values)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
def get_all_stats(self) -> Dict[str, Dict[str, Any]]:
|
|
76
|
-
"""Get statistics for all metrics."""
|
|
77
|
-
with self._lock:
|
|
78
|
-
return {name: self.get_metric_stats(name) for name in self._metrics.keys()}
|
|
79
|
-
|
|
80
|
-
def get_performance_stats(self) -> Dict[str, Any]:
|
|
81
|
-
"""Get performance statistics."""
|
|
82
|
-
with self._lock:
|
|
83
|
-
return {
|
|
84
|
-
'load_times': {k: {'count': len(v), 'total': sum(v), 'average': sum(v) / len(v) if v else 0.0}
|
|
85
|
-
for k, v in self._load_times.items()},
|
|
86
|
-
'access_counts': self._access_counts.copy(),
|
|
87
|
-
'memory_usage': 0.0 # TODO: Implement memory usage tracking
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
def shutdown_multi_tier_cache(self) -> None:
|
|
91
|
-
"""Shutdown cache (flush L2, cleanup threads)."""
|
|
92
|
-
# TODO: Implement cache shutdown
|
|
93
|
-
pass
|
|
94
|
-
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
#exonware/xwlazy/src/exonware/xwlazy/loading/intelligent_utils.py
|
|
3
|
-
|
|
4
|
-
Intelligent mode utilities for automatic mode switching.
|
|
5
|
-
|
|
6
|
-
Company: eXonware.com
|
|
7
|
-
Author: Eng. Muhammad AlShehri
|
|
8
|
-
Email: connect@exonware.com
|
|
9
|
-
|
|
10
|
-
Generation Date: 19-Nov-2025
|
|
11
|
-
|
|
12
|
-
This module provides intelligent mode switching based on load level.
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
from typing import Dict, Tuple, Optional
|
|
16
|
-
|
|
17
|
-
from ..defs import LazyLoadMode, LazyInstallMode, LoadLevel
|
|
18
|
-
|
|
19
|
-
# Lazy import to avoid circular dependency
|
|
20
|
-
logger = None
|
|
21
|
-
|
|
22
|
-
def _get_logger():
|
|
23
|
-
"""Get logger (lazy import to avoid circular dependency)."""
|
|
24
|
-
global logger
|
|
25
|
-
if logger is None:
|
|
26
|
-
from ..common.logger import get_logger
|
|
27
|
-
logger = get_logger("xwlazy.loading.intelligent")
|
|
28
|
-
return logger
|
|
29
|
-
|
|
30
|
-
# Optimal mode mappings based on benchmark results (updated from consistency test)
|
|
31
|
-
# Format: {LoadLevel: (LazyLoadMode, LazyInstallMode)}
|
|
32
|
-
# Updated: 2025-11-19 - Based on 20-iteration consistency test averages
|
|
33
|
-
# Light: ultra+full (0.568ms avg), Medium: hyperparallel+full (5.134ms avg)
|
|
34
|
-
# Heavy: preload+size_aware (18.475ms avg), Enterprise: preload+full (44.742ms avg)
|
|
35
|
-
INTELLIGENT_MODE_MAP: Dict[LoadLevel, Tuple[LazyLoadMode, LazyInstallMode]] = {
|
|
36
|
-
LoadLevel.LIGHT: (LazyLoadMode.ULTRA, LazyInstallMode.FULL), # Winner: 0.568ms avg (±26.1% CV)
|
|
37
|
-
LoadLevel.MEDIUM: (LazyLoadMode.HYPERPARALLEL, LazyInstallMode.FULL), # Winner: 5.134ms avg (±4.7% CV)
|
|
38
|
-
LoadLevel.HEAVY: (LazyLoadMode.PRELOAD, LazyInstallMode.SIZE_AWARE), # Winner: 18.475ms avg (±10.2% CV)
|
|
39
|
-
LoadLevel.ENTERPRISE: (LazyLoadMode.PRELOAD, LazyInstallMode.FULL), # Winner: 44.742ms avg (±1.5% CV)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
class IntelligentModeSelector:
|
|
43
|
-
"""Selects optimal mode based on current load characteristics."""
|
|
44
|
-
|
|
45
|
-
def __init__(self, mode_map: Optional[Dict[LoadLevel, Tuple[LazyLoadMode, LazyInstallMode]]] = None):
|
|
46
|
-
"""
|
|
47
|
-
Initialize intelligent mode selector.
|
|
48
|
-
|
|
49
|
-
Args:
|
|
50
|
-
mode_map: Custom mode mapping (defaults to INTELLIGENT_MODE_MAP)
|
|
51
|
-
"""
|
|
52
|
-
self._mode_map = mode_map or INTELLIGENT_MODE_MAP.copy()
|
|
53
|
-
self._current_load_level: Optional[LoadLevel] = None
|
|
54
|
-
self._module_count = 0
|
|
55
|
-
self._total_import_time = 0.0
|
|
56
|
-
self._import_count = 0
|
|
57
|
-
|
|
58
|
-
def update_mode_map(self, mode_map: Dict[LoadLevel, Tuple[LazyLoadMode, LazyInstallMode]]) -> None:
|
|
59
|
-
"""Update the mode mapping with benchmark results."""
|
|
60
|
-
self._mode_map = mode_map.copy()
|
|
61
|
-
_get_logger().info(f"Updated INTELLIGENT mode mapping: {mode_map}")
|
|
62
|
-
|
|
63
|
-
def detect_load_level(
|
|
64
|
-
self,
|
|
65
|
-
module_count: int = 0,
|
|
66
|
-
total_import_time: float = 0.0,
|
|
67
|
-
import_count: int = 0,
|
|
68
|
-
memory_usage_mb: float = 0.0
|
|
69
|
-
) -> LoadLevel:
|
|
70
|
-
"""
|
|
71
|
-
Detect current load level based on system characteristics.
|
|
72
|
-
|
|
73
|
-
Args:
|
|
74
|
-
module_count: Number of modules loaded
|
|
75
|
-
total_import_time: Total time spent on imports (seconds)
|
|
76
|
-
import_count: Number of imports performed
|
|
77
|
-
memory_usage_mb: Current memory usage in MB
|
|
78
|
-
|
|
79
|
-
Returns:
|
|
80
|
-
Detected LoadLevel
|
|
81
|
-
"""
|
|
82
|
-
# Update internal state
|
|
83
|
-
self._module_count = module_count
|
|
84
|
-
self._total_import_time = total_import_time
|
|
85
|
-
self._import_count = import_count
|
|
86
|
-
|
|
87
|
-
# Simple heuristics based on module count and import patterns
|
|
88
|
-
# These thresholds can be tuned based on actual usage patterns
|
|
89
|
-
|
|
90
|
-
if import_count == 0:
|
|
91
|
-
# Initial state - default to light
|
|
92
|
-
self._current_load_level = LoadLevel.LIGHT
|
|
93
|
-
elif module_count < 5 and import_count < 10:
|
|
94
|
-
# Light load: few modules, few imports
|
|
95
|
-
self._current_load_level = LoadLevel.LIGHT
|
|
96
|
-
elif module_count < 20 and import_count < 50:
|
|
97
|
-
# Medium load: moderate number of modules/imports
|
|
98
|
-
self._current_load_level = LoadLevel.MEDIUM
|
|
99
|
-
elif module_count < 100 and import_count < 200:
|
|
100
|
-
# Heavy load: many modules, many imports
|
|
101
|
-
self._current_load_level = LoadLevel.HEAVY
|
|
102
|
-
else:
|
|
103
|
-
# Enterprise load: very large scale
|
|
104
|
-
self._current_load_level = LoadLevel.ENTERPRISE
|
|
105
|
-
|
|
106
|
-
# Override based on memory usage if significant
|
|
107
|
-
if memory_usage_mb > 300:
|
|
108
|
-
self._current_load_level = LoadLevel.ENTERPRISE
|
|
109
|
-
elif memory_usage_mb > 150:
|
|
110
|
-
self._current_load_level = LoadLevel.HEAVY
|
|
111
|
-
|
|
112
|
-
return self._current_load_level
|
|
113
|
-
|
|
114
|
-
def get_optimal_mode(self, load_level: Optional[LoadLevel] = None) -> Tuple[LazyLoadMode, LazyInstallMode]:
|
|
115
|
-
"""
|
|
116
|
-
Get optimal mode combination for given load level.
|
|
117
|
-
|
|
118
|
-
Args:
|
|
119
|
-
load_level: Load level (if None, uses detected level)
|
|
120
|
-
|
|
121
|
-
Returns:
|
|
122
|
-
Tuple of (LazyLoadMode, LazyInstallMode)
|
|
123
|
-
"""
|
|
124
|
-
if load_level is None:
|
|
125
|
-
load_level = self._current_load_level or LoadLevel.LIGHT
|
|
126
|
-
|
|
127
|
-
optimal = self._mode_map.get(load_level)
|
|
128
|
-
if optimal is None:
|
|
129
|
-
# Fallback to default
|
|
130
|
-
_get_logger().warning(f"No optimal mode found for {load_level}, using default")
|
|
131
|
-
optimal = (LazyLoadMode.AUTO, LazyInstallMode.SMART)
|
|
132
|
-
|
|
133
|
-
return optimal
|
|
134
|
-
|
|
135
|
-
def should_switch_mode(
|
|
136
|
-
self,
|
|
137
|
-
current_mode: Tuple[LazyLoadMode, LazyInstallMode],
|
|
138
|
-
detected_level: LoadLevel
|
|
139
|
-
) -> bool:
|
|
140
|
-
"""
|
|
141
|
-
Determine if mode should be switched based on detected load level.
|
|
142
|
-
|
|
143
|
-
Args:
|
|
144
|
-
current_mode: Current (load_mode, install_mode) tuple
|
|
145
|
-
detected_level: Detected load level
|
|
146
|
-
|
|
147
|
-
Returns:
|
|
148
|
-
True if mode should be switched
|
|
149
|
-
"""
|
|
150
|
-
optimal_mode = self.get_optimal_mode(detected_level)
|
|
151
|
-
return current_mode != optimal_mode
|
|
152
|
-
|
|
153
|
-
def get_stats(self) -> Dict:
|
|
154
|
-
"""Get intelligent mode statistics."""
|
|
155
|
-
return {
|
|
156
|
-
'current_load_level': self._current_load_level.value if self._current_load_level else None,
|
|
157
|
-
'module_count': self._module_count,
|
|
158
|
-
'import_count': self._import_count,
|
|
159
|
-
'total_import_time': self._total_import_time,
|
|
160
|
-
'mode_map': {
|
|
161
|
-
level.value: {
|
|
162
|
-
'load_mode': mode[0].value,
|
|
163
|
-
'install_mode': mode[1].value
|
|
164
|
-
}
|
|
165
|
-
for level, mode in self._mode_map.items()
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
__all__ = ['LoadLevel', 'INTELLIGENT_MODE_MAP', 'IntelligentModeSelector']
|
|
170
|
-
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Performance metrics tracking for lazy loading system.
|
|
3
|
-
|
|
4
|
-
This module provides utilities for tracking and aggregating performance metrics.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
from typing import Dict, Any, List, Optional
|
|
8
|
-
from datetime import datetime
|
|
9
|
-
from collections import defaultdict
|
|
10
|
-
|
|
11
|
-
class MetricsCollector:
|
|
12
|
-
"""Collects and aggregates performance metrics."""
|
|
13
|
-
|
|
14
|
-
def __init__(self):
|
|
15
|
-
"""Initialize metrics collector."""
|
|
16
|
-
self._metrics: Dict[str, List[float]] = defaultdict(list)
|
|
17
|
-
self._counts: Dict[str, int] = defaultdict(int)
|
|
18
|
-
self._timestamps: Dict[str, List[datetime]] = defaultdict(list)
|
|
19
|
-
|
|
20
|
-
def record_metric(self, name: str, value: float, timestamp: Optional[datetime] = None) -> None:
|
|
21
|
-
"""Record a metric value."""
|
|
22
|
-
self._metrics[name].append(value)
|
|
23
|
-
self._counts[name] += 1
|
|
24
|
-
if timestamp is None:
|
|
25
|
-
timestamp = datetime.now()
|
|
26
|
-
self._timestamps[name].append(timestamp)
|
|
27
|
-
|
|
28
|
-
def get_metric_stats(self, name: str) -> Dict[str, Any]:
|
|
29
|
-
"""Get statistics for a specific metric."""
|
|
30
|
-
values = self._metrics.get(name, [])
|
|
31
|
-
if not values:
|
|
32
|
-
return {}
|
|
33
|
-
|
|
34
|
-
return {
|
|
35
|
-
'count': len(values),
|
|
36
|
-
'total': sum(values),
|
|
37
|
-
'average': sum(values) / len(values),
|
|
38
|
-
'min': min(values),
|
|
39
|
-
'max': max(values),
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
def get_all_stats(self) -> Dict[str, Dict[str, Any]]:
|
|
43
|
-
"""Get statistics for all metrics."""
|
|
44
|
-
return {name: self.get_metric_stats(name) for name in self._metrics.keys()}
|
|
45
|
-
|
|
46
|
-
def clear(self) -> None:
|
|
47
|
-
"""Clear all collected metrics."""
|
|
48
|
-
self._metrics.clear()
|
|
49
|
-
self._counts.clear()
|
|
50
|
-
self._timestamps.clear()
|
|
51
|
-
|
|
52
|
-
# Global metrics collector instance
|
|
53
|
-
_global_metrics = MetricsCollector()
|
|
54
|
-
|
|
55
|
-
def get_metrics_collector() -> MetricsCollector:
|
|
56
|
-
"""Get the global metrics collector instance."""
|
|
57
|
-
return _global_metrics
|
|
58
|
-
|
|
59
|
-
__all__ = ['MetricsCollector', 'get_metrics_collector']
|
|
60
|
-
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Performance monitoring for lazy loading system.
|
|
3
|
-
|
|
4
|
-
This module contains LazyPerformanceMonitor extracted from lazy_core.py Section 4.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
from typing import Dict, Any
|
|
8
|
-
|
|
9
|
-
class LazyPerformanceMonitor:
|
|
10
|
-
"""Performance monitor for lazy loading operations."""
|
|
11
|
-
|
|
12
|
-
__slots__ = ('_load_times', '_access_counts', '_memory_usage')
|
|
13
|
-
|
|
14
|
-
def __init__(self):
|
|
15
|
-
"""Initialize performance monitor."""
|
|
16
|
-
self._load_times: Dict[str, float] = {}
|
|
17
|
-
self._access_counts: Dict[str, int] = {}
|
|
18
|
-
self._memory_usage: Dict[str, Any] = {}
|
|
19
|
-
|
|
20
|
-
def record_load_time(self, module: str, load_time: float) -> None:
|
|
21
|
-
"""Record module load time."""
|
|
22
|
-
self._load_times[module] = load_time
|
|
23
|
-
|
|
24
|
-
def record_access(self, module: str) -> None:
|
|
25
|
-
"""Record module access."""
|
|
26
|
-
self._access_counts[module] = self._access_counts.get(module, 0) + 1
|
|
27
|
-
|
|
28
|
-
def get_stats(self) -> Dict[str, Any]:
|
|
29
|
-
"""Get performance statistics."""
|
|
30
|
-
return {
|
|
31
|
-
'load_times': self._load_times.copy(),
|
|
32
|
-
'access_counts': self._access_counts.copy(),
|
|
33
|
-
'memory_usage': self._memory_usage.copy()
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
__all__ = ['LazyPerformanceMonitor']
|
|
37
|
-
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
exonware/__init__.py,sha256=xpCICV8C4s1oKqjpDVuHMmilz0pDpJn-j0wrWk5irDE,695
|
|
2
|
-
exonware/xwlazy/__init__.py,sha256=7_eS3ekP3Z3A5FbXUFaovcrCexUqvNsf57tLHv8XnMQ,10235
|
|
3
|
-
exonware/xwlazy/config.py,sha256=ca0ECwTt34zFbNYfuwCeC0w17zatLstNk5l52UwhhQg,6241
|
|
4
|
-
exonware/xwlazy/contracts.py,sha256=Jyr1anMVZS_DCjhY7k27I2qNOJYYc1pBFStMJMmG--M,44365
|
|
5
|
-
exonware/xwlazy/defs.py,sha256=hY-MOMLbFNNPfdZXUwRCdOj9pYEUuFuTZQlwPSYUz2M,12290
|
|
6
|
-
exonware/xwlazy/errors.py,sha256=2a-FMiQa4h-m7SCqo19a7h09zGiAHClnuZCGKgvYO0I,9188
|
|
7
|
-
exonware/xwlazy/facade.py,sha256=4Hd6JGAKbn2y7n9QsS4Mbf1AjaXdFMSUEiaOCQyrZ4U,38749
|
|
8
|
-
exonware/xwlazy/version.py,sha256=k6zX-9WJv4yTRXqJWQYw5XrLf-yyZ9n_ECKpO77dqOo,2351
|
|
9
|
-
exonware/xwlazy/common/__init__.py,sha256=VSW_iv6dyaC1YtoY66bAsrLFRJW-f0UVeB7Qgr-FOiU,860
|
|
10
|
-
exonware/xwlazy/common/base.py,sha256=TsGduH5yspumKjMPKXeqJkz7-n7KyXcbm6PhzwapZOo,1404
|
|
11
|
-
exonware/xwlazy/common/cache.py,sha256=ZDGtx1XfY_g_EP7eV20ASKkxyTANqvciOKk1UdQkIf4,17547
|
|
12
|
-
exonware/xwlazy/common/logger.py,sha256=mHyFyBulHcvwb2EuTHhVYDsdKoaVXCdJ84vowiXBUrI,8350
|
|
13
|
-
exonware/xwlazy/common/services/__init__.py,sha256=LgoL5PdLdaanKKkw1WghiNirLIFpkSkExlXWBezGZdc,1774
|
|
14
|
-
exonware/xwlazy/common/services/dependency_mapper.py,sha256=D4Hdu-oDt_RHMFdRkHyYeiQlvhf5pgShopvzytt486A,8555
|
|
15
|
-
exonware/xwlazy/common/services/install_async_utils.py,sha256=RIx5bemXjcQOPyPvKLuHUQOFGWdwdM9tOz-w-ZAF8lw,4966
|
|
16
|
-
exonware/xwlazy/common/services/install_cache_utils.py,sha256=vIZxNASN8q_rigla8LoHWDAqGo8qgaHQ4xI1SOcj25k,7589
|
|
17
|
-
exonware/xwlazy/common/services/keyword_detection.py,sha256=B-Wo_KArhsZSUb_XNSnJjcoZob6l4BrBYyXf5ixk444,9776
|
|
18
|
-
exonware/xwlazy/common/services/spec_cache.py,sha256=rdQb43vUoMpNeHUeK3ANF42mn9k5V2D9ohEeLunqrkk,5318
|
|
19
|
-
exonware/xwlazy/common/services/state_manager.py,sha256=hYU4w8GX0-Zq7NAcMGRuEKMWMJ1LBzPhJH0A5dmM7jg,3116
|
|
20
|
-
exonware/xwlazy/common/strategies/__init__.py,sha256=4GERnc2Ktj_DiMHn0UUqdXcY5nGedbZer9vPhKQyf9I,633
|
|
21
|
-
exonware/xwlazy/common/strategies/caching_dict.py,sha256=IFX6bjf5jStqG66qMKWYXpWiGKsvxIE1WCfsz_KKJhM,1126
|
|
22
|
-
exonware/xwlazy/common/strategies/caching_installation.py,sha256=uamdlsXbbf_rkz3O5z9MlMlmTKYF2i_-G7ZiOP62Zyk,2523
|
|
23
|
-
exonware/xwlazy/common/strategies/caching_lfu.py,sha256=5lBOaDolMHqX3_KjZLavaXeAEiVnhLpPHJlQD3oP2mU,1971
|
|
24
|
-
exonware/xwlazy/common/strategies/caching_lru.py,sha256=5ibtwtmZSJsz9rlga3p8MIIdfAUTidhUCuSWHbFU4Jk,1832
|
|
25
|
-
exonware/xwlazy/common/strategies/caching_multitier.py,sha256=HpFYjc-8-suosexfpwrw9NQyZSdKh0Nd3KT4E7MjC0Y,1910
|
|
26
|
-
exonware/xwlazy/common/strategies/caching_ttl.py,sha256=OvJtelb_-q3yTN8DzKfquYm-_igfe9DddLBbD71J80U,1637
|
|
27
|
-
exonware/xwlazy/module/__init__.py,sha256=sL_G0RvpMfif0e3Yzo0CSj2xAPPF6phlQB367agzqfE,627
|
|
28
|
-
exonware/xwlazy/module/base.py,sha256=eqTj8xHtSXIiqMiycfAcQ76RUQVqxpKXGIiyyesbViI,20682
|
|
29
|
-
exonware/xwlazy/module/data.py,sha256=Q3xNBQgHM_AlMvujkx_YmVT3H1Fr-6xUqryTlWClbp8,318
|
|
30
|
-
exonware/xwlazy/module/facade.py,sha256=zrjN5BEMpEjT64etss2Rh627onjwIzV3c6UNvk2jD-k,8089
|
|
31
|
-
exonware/xwlazy/module/importer_engine.py,sha256=dc1EF95nAHu9omnN0ui9XkSO6PM_ly3yx_unz694m4I,91818
|
|
32
|
-
exonware/xwlazy/module/strategies/__init__.py,sha256=oV49bhWlErG197Y7yKcUzm4acDvfGnVm77lcNLgAu5I,467
|
|
33
|
-
exonware/xwlazy/module/strategies/module_helper_lazy.py,sha256=fr71AOWXS2BE5RWccFar8Edi5SppsPwbuCtLvahppYY,2679
|
|
34
|
-
exonware/xwlazy/module/strategies/module_helper_simple.py,sha256=Hu3z5X_Fg24jZuumUmV8mk1bFyrNu85gUgSR-YHHUZI,1683
|
|
35
|
-
exonware/xwlazy/module/strategies/module_manager_advanced.py,sha256=lMkfFZlExpGUTDKpZAmxAXX5Cely4qy5l3yPl0rD0Hs,3293
|
|
36
|
-
exonware/xwlazy/module/strategies/module_manager_simple.py,sha256=zKkWSZXpz0gZAftkaQZVfjdh3zpHvdLhHik5iOLZGXc,2442
|
|
37
|
-
exonware/xwlazy/package/__init__.py,sha256=UI7xwTbFDURAt7kCr3yRhZzZtFrWRDwhJXakSyJwSCU,640
|
|
38
|
-
exonware/xwlazy/package/base.py,sha256=SAj5kCxVt9gHvrT770aEiFb8mc3OELz5kE2ZxpR8Kdk,27930
|
|
39
|
-
exonware/xwlazy/package/conf.py,sha256=OMoLj59sypWaVQZ-ELrxKv5fIqMyJcN7HhzYgWJW-Mg,14053
|
|
40
|
-
exonware/xwlazy/package/data.py,sha256=3TFb_Qr6HJfQSCBG4Kg9-dIbyrt76zpMnAFoD0ZdTEA,323
|
|
41
|
-
exonware/xwlazy/package/facade.py,sha256=r5hW0ve2FQ6oqspCPts3ZHFA-cvNQcsCBZVjfClpVkw,18743
|
|
42
|
-
exonware/xwlazy/package/services/__init__.py,sha256=ydB2kRzx6I3Kpm-bYyecTwHdkE_544X0CAXHZh7AyZY,2240
|
|
43
|
-
exonware/xwlazy/package/services/async_install_handle.py,sha256=TN7iYUOPiTGG-xXtPjdFTIZ7-_IEn0vYeWK-EuEhlNU,2803
|
|
44
|
-
exonware/xwlazy/package/services/config_manager.py,sha256=JOWciuQi2D7BCLm90i0nbWvksVidPrK1vCUcXjhAnkE,10551
|
|
45
|
-
exonware/xwlazy/package/services/discovery.py,sha256=DxFHz5OMg4kg5Dy_zkKQaU5wdSyIGFXFXz7-DVvLgfI,14637
|
|
46
|
-
exonware/xwlazy/package/services/host_packages.py,sha256=NGpqadJpJtUBFTBxG4axNhEYXAuCUu_ktWYRTbobaVI,5429
|
|
47
|
-
exonware/xwlazy/package/services/install_async.py,sha256=pcTzX_COx2E4vP6MAzwu7OC0XZImWKfsrFrPQvV46Z0,13279
|
|
48
|
-
exonware/xwlazy/package/services/install_cache.py,sha256=KL0uzK7CmFiTFs8zjWOY8zYXKSC2cLcUD_cWDEktsTI,5974
|
|
49
|
-
exonware/xwlazy/package/services/install_interactive.py,sha256=5tvVeogm9wIVG6u8jiSSpmXiPt1wXMtdTAETjsZ3QBE,2155
|
|
50
|
-
exonware/xwlazy/package/services/install_policy.py,sha256=_et-C7m5iOxudpkSBT9G2lNqqt1EUZh-nygSjyQdMEM,5876
|
|
51
|
-
exonware/xwlazy/package/services/install_registry.py,sha256=1_6T3xaMM0IaitpFsvLxBCSBBWbnE0nwdPZd86a9qFg,1504
|
|
52
|
-
exonware/xwlazy/package/services/install_result.py,sha256=MeXi-B9QBO1uZlyUbCBDNu_LBoYYQiInWoIDLQ0BVCs,346
|
|
53
|
-
exonware/xwlazy/package/services/install_sbom.py,sha256=aph691SEPu8lvPDR5Fbf2JyPemlKKVEbra-79JzhV60,5571
|
|
54
|
-
exonware/xwlazy/package/services/install_utils.py,sha256=T1KeU3fbyNFYdYjeBWUIfWwTSQ6WHASVl-zSDDvxrvI,2371
|
|
55
|
-
exonware/xwlazy/package/services/installer_engine.py,sha256=d5Vxq_wicVhn52Mm-iTd9pWCkqJZ9_361L-6rP3bhrI,15363
|
|
56
|
-
exonware/xwlazy/package/services/lazy_installer.py,sha256=2oZxVZZX3hMsBwIYwzS97YVUPvRGbepTb04EnlIfHMI,32098
|
|
57
|
-
exonware/xwlazy/package/services/manifest.py,sha256=txAotO00hJtfsMuNX6HycyCTBbjs_nSgOARXSSLNGPw,19163
|
|
58
|
-
exonware/xwlazy/package/services/strategy_registry.py,sha256=4pKEKSy_TshHNGw2GctYJTMzk7z5YBncS2wfrBNBEsY,6796
|
|
59
|
-
exonware/xwlazy/package/strategies/__init__.py,sha256=r_gpreZ6kcsWfHkGABYlZVx69JdvbMwlftitAKEwbrA,1626
|
|
60
|
-
exonware/xwlazy/package/strategies/package_discovery_file.py,sha256=mArPdled9s3ql7NncFwPgRSINtC2FM7a7k7Xi5jPgVA,4394
|
|
61
|
-
exonware/xwlazy/package/strategies/package_discovery_hybrid.py,sha256=7HdmbIILFcm2FNV7o3x3Pc1jUUuiUHaSAMItor6xJCk,2654
|
|
62
|
-
exonware/xwlazy/package/strategies/package_discovery_manifest.py,sha256=EiBbwWcggJvue6iJbmSmsNXpBNhS74vb7sLysEEK_F4,3368
|
|
63
|
-
exonware/xwlazy/package/strategies/package_execution_async.py,sha256=sZDtelXLdoumdVTywjyjdyvv10mKXroASc2FuAZ-p60,3644
|
|
64
|
-
exonware/xwlazy/package/strategies/package_execution_cached.py,sha256=htl8YOusqwIgEPZjn__KNK77lHCkWfFJyjF90gb2CcY,2680
|
|
65
|
-
exonware/xwlazy/package/strategies/package_execution_pip.py,sha256=gBz7tCpE6n5bkrU2EjQvt0gymn-cPUFxyAxmJfDIgtI,2963
|
|
66
|
-
exonware/xwlazy/package/strategies/package_execution_wheel.py,sha256=pb4mJLqwDrLiH46koW0wcQtbrwTDY1-GgtTCR6ryGuM,3209
|
|
67
|
-
exonware/xwlazy/package/strategies/package_mapping_discovery_first.py,sha256=La3VZPPDsvhBgQ-q23kFJWVqPBYhzt2fzpFINobnotA,3279
|
|
68
|
-
exonware/xwlazy/package/strategies/package_mapping_hybrid.py,sha256=bchfFkzVRLh1AVCQ6OLYzkilW5pqAJug4C_fS_XRFn0,3399
|
|
69
|
-
exonware/xwlazy/package/strategies/package_mapping_manifest_first.py,sha256=Q25r0L4193sKPWPe1YMMxvXnH0hkrKPc_TchPSgOljw,3304
|
|
70
|
-
exonware/xwlazy/package/strategies/package_policy_allow_list.py,sha256=l_1w_LnWWvGtOsJxlbrwfYIDLn1DSgwWlJh-dDQIoWE,1556
|
|
71
|
-
exonware/xwlazy/package/strategies/package_policy_deny_list.py,sha256=S1xdNe_ticMvSt_gigLkTR_b9wV0_H9iDTJ-io9yfWk,1516
|
|
72
|
-
exonware/xwlazy/package/strategies/package_policy_permissive.py,sha256=k2MndZ7kBH-SEfgEycNJidwaVo9994a32YLCStR2pH0,1127
|
|
73
|
-
exonware/xwlazy/package/strategies/package_timing_clean.py,sha256=KwZmo8KSa4_jJOwwgrAujdUUBJQEHml8rWY0tuvhoZk,1826
|
|
74
|
-
exonware/xwlazy/package/strategies/package_timing_full.py,sha256=1vphf9RXTE1tLFfmqAwytleGqR2Pia9jGXNT5d-pvQg,1736
|
|
75
|
-
exonware/xwlazy/package/strategies/package_timing_smart.py,sha256=GlmAR77qK0lfpu6DoLokJ1BOUo1cWVgZt0nBmf5xG2U,1835
|
|
76
|
-
exonware/xwlazy/package/strategies/package_timing_temporary.py,sha256=ek6HE4S5RAiljDgbfw6m1D_U4iDYV-F6r5LZ_uzvxM4,1795
|
|
77
|
-
exonware/xwlazy/runtime/__init__.py,sha256=jbIzemqwtWvKu2LxhYU7pIcihNakQHCON8xZW0orqZA,636
|
|
78
|
-
exonware/xwlazy/runtime/adaptive_learner.py,sha256=fx1p9cMES_CB8l4ir0giuJHPzlCLPbl3iMpru6TNvPo,5256
|
|
79
|
-
exonware/xwlazy/runtime/base.py,sha256=mEKlUe09wpCI8VHF3I-pdnH5VIDC1PqK8iQzANR_b90,10019
|
|
80
|
-
exonware/xwlazy/runtime/facade.py,sha256=9R-1aXMTxZuaN1xD2JrU2RFjzPKXu7-oTM5dTV5kY1E,3415
|
|
81
|
-
exonware/xwlazy/runtime/intelligent_selector.py,sha256=501Lrsa3_CaA1-mY6H-w46KEblpsYjO3_mzbNJJKgKM,6531
|
|
82
|
-
exonware/xwlazy/runtime/metrics.py,sha256=QHYKZ55pjdEKeOBjMVQ2N2y0rgJWAOWeD_N0S7YYOHg,1987
|
|
83
|
-
exonware/xwlazy/runtime/performance.py,sha256=57ygfRhqyZVn75B55b7-eKk1EIisdCD8qrbwv2wKAl4,1198
|
|
84
|
-
exonware_xwlazy-0.1.0.22.dist-info/METADATA,sha256=02FdVbrd98Q538U5emQRRqscmaQWFulDQhNREaBydqw,16859
|
|
85
|
-
exonware_xwlazy-0.1.0.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
86
|
-
exonware_xwlazy-0.1.0.22.dist-info/licenses/LICENSE,sha256=w42ohoEUfhyT0NgiivAL4fWg2AMRLGnfXPMAR4EO-MU,1094
|
|
87
|
-
exonware_xwlazy-0.1.0.22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|