asyncviz 0.1.0__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.
- asyncviz/__init__.py +36 -0
- asyncviz/__main__.py +21 -0
- asyncviz/benchmarks/__init__.py +143 -0
- asyncviz/benchmarks/__main__.py +161 -0
- asyncviz/benchmarks/benchmark_baselines.py +82 -0
- asyncviz/benchmarks/benchmark_configuration.py +105 -0
- asyncviz/benchmarks/benchmark_diagnostics.py +44 -0
- asyncviz/benchmarks/benchmark_models.py +205 -0
- asyncviz/benchmarks/benchmark_observability.py +119 -0
- asyncviz/benchmarks/benchmark_registry.py +132 -0
- asyncviz/benchmarks/benchmark_runner.py +338 -0
- asyncviz/benchmarks/benchmark_statistics.py +149 -0
- asyncviz/benchmarks/benchmark_thresholds.py +72 -0
- asyncviz/benchmarks/benchmark_tracing.py +87 -0
- asyncviz/benchmarks/datasets/__init__.py +3 -0
- asyncviz/benchmarks/fixtures/__init__.py +7 -0
- asyncviz/benchmarks/instrumentation/__init__.py +13 -0
- asyncviz/benchmarks/instrumentation/bench_event_bus_publish.py +35 -0
- asyncviz/benchmarks/instrumentation/bench_event_serialization.py +24 -0
- asyncviz/benchmarks/memory/__init__.py +5 -0
- asyncviz/benchmarks/memory/bench_event_allocation.py +18 -0
- asyncviz/benchmarks/profiling/__init__.py +17 -0
- asyncviz/benchmarks/profiling/cpu_profile.py +69 -0
- asyncviz/benchmarks/profiling/tracemalloc_profile.py +64 -0
- asyncviz/benchmarks/rendering/__init__.py +3 -0
- asyncviz/benchmarks/replay/__init__.py +8 -0
- asyncviz/benchmarks/replay/bench_format_codec.py +33 -0
- asyncviz/benchmarks/replay/bench_loader_iteration.py +35 -0
- asyncviz/benchmarks/reporting/__init__.py +15 -0
- asyncviz/benchmarks/reporting/ci_summary.py +52 -0
- asyncviz/benchmarks/reporting/json_report.py +92 -0
- asyncviz/benchmarks/reporting/markdown_report.py +82 -0
- asyncviz/benchmarks/runtime/__init__.py +1 -0
- asyncviz/benchmarks/stress/__init__.py +6 -0
- asyncviz/benchmarks/stress/bench_event_storm.py +32 -0
- asyncviz/benchmarks/synthetic/__init__.py +10 -0
- asyncviz/benchmarks/synthetic/event_workload.py +28 -0
- asyncviz/benchmarks/synthetic/recording_workload.py +121 -0
- asyncviz/benchmarks/utilities/__init__.py +23 -0
- asyncviz/benchmarks/utilities/gc_control.py +45 -0
- asyncviz/benchmarks/utilities/memory.py +58 -0
- asyncviz/benchmarks/utilities/timing.py +71 -0
- asyncviz/benchmarks/websocket/__init__.py +5 -0
- asyncviz/benchmarks/websocket/bench_event_serialization.py +25 -0
- asyncviz/bootstrap/__init__.py +24 -0
- asyncviz/bootstrap/bootstrap.py +165 -0
- asyncviz/bootstrap/browser.py +36 -0
- asyncviz/bootstrap/config.py +54 -0
- asyncviz/bootstrap/runtime.py +60 -0
- asyncviz/bootstrap/services.py +103 -0
- asyncviz/bootstrap/validation.py +68 -0
- asyncviz/cli/__init__.py +12 -0
- asyncviz/cli/browser/__init__.py +156 -0
- asyncviz/cli/browser/browser_availability.py +50 -0
- asyncviz/cli/browser/browser_backpressure.py +78 -0
- asyncviz/cli/browser/browser_configuration.py +61 -0
- asyncviz/cli/browser/browser_detection.py +131 -0
- asyncviz/cli/browser/browser_diagnostics.py +88 -0
- asyncviz/cli/browser/browser_launcher.py +417 -0
- asyncviz/cli/browser/browser_metrics.py +100 -0
- asyncviz/cli/browser/browser_policy.py +108 -0
- asyncviz/cli/browser/browser_preferences.py +69 -0
- asyncviz/cli/browser/browser_process.py +90 -0
- asyncviz/cli/browser/browser_readiness.py +111 -0
- asyncviz/cli/browser/browser_sessions.py +63 -0
- asyncviz/cli/browser/browser_statistics.py +58 -0
- asyncviz/cli/browser/browser_tracing.py +64 -0
- asyncviz/cli/browser/browser_urls.py +38 -0
- asyncviz/cli/commands/__init__.py +20 -0
- asyncviz/cli/commands/doctor.py +149 -0
- asyncviz/cli/commands/record.py +51 -0
- asyncviz/cli/commands/replay.py +34 -0
- asyncviz/cli/commands/run.py +23 -0
- asyncviz/cli/commands/version.py +38 -0
- asyncviz/cli/configuration/__init__.py +40 -0
- asyncviz/cli/configuration/cli_configuration.py +155 -0
- asyncviz/cli/configuration/defaults.py +32 -0
- asyncviz/cli/configuration/validation.py +104 -0
- asyncviz/cli/entrypoint.py +74 -0
- asyncviz/cli/exit_codes.py +68 -0
- asyncviz/cli/main.py +21 -0
- asyncviz/cli/output.py +99 -0
- asyncviz/cli/parser.py +661 -0
- asyncviz/cli/runtime/__init__.py +68 -0
- asyncviz/cli/runtime/bootstrap_entry.py +401 -0
- asyncviz/cli/runtime/diagnostics.py +55 -0
- asyncviz/cli/runtime/instrumentation_injection.py +39 -0
- asyncviz/cli/runtime/launcher.py +159 -0
- asyncviz/cli/runtime/lifecycle.py +84 -0
- asyncviz/cli/runtime/loop_discovery.py +153 -0
- asyncviz/cli/runtime/observability.py +108 -0
- asyncviz/cli/runtime/process_environment.py +40 -0
- asyncviz/cli/runtime/replay_bundle_adapter.py +243 -0
- asyncviz/cli/runtime/replay_launcher.py +453 -0
- asyncviz/cli/runtime/subprocess_runner.py +121 -0
- asyncviz/collector/__init__.py +0 -0
- asyncviz/config.py +134 -0
- asyncviz/configuration/__init__.py +137 -0
- asyncviz/configuration/environment/__init__.py +172 -0
- asyncviz/configuration/environment/environment_defaults.py +28 -0
- asyncviz/configuration/environment/environment_diagnostics.py +63 -0
- asyncviz/configuration/environment/environment_loader.py +149 -0
- asyncviz/configuration/environment/environment_mapping.py +255 -0
- asyncviz/configuration/environment/environment_namespaces.py +74 -0
- asyncviz/configuration/environment/environment_normalization.py +35 -0
- asyncviz/configuration/environment/environment_observability.py +72 -0
- asyncviz/configuration/environment/environment_overrides.py +54 -0
- asyncviz/configuration/environment/environment_parser.py +176 -0
- asyncviz/configuration/environment/environment_provenance.py +57 -0
- asyncviz/configuration/environment/environment_resolution.py +188 -0
- asyncviz/configuration/environment/environment_security.py +35 -0
- asyncviz/configuration/environment/environment_serialization.py +119 -0
- asyncviz/configuration/environment/environment_tracing.py +62 -0
- asyncviz/configuration/environment/environment_types.py +75 -0
- asyncviz/configuration/environment/environment_validation.py +69 -0
- asyncviz/configuration/runtime_browser.py +36 -0
- asyncviz/configuration/runtime_cli_mapping.py +53 -0
- asyncviz/configuration/runtime_configuration.py +55 -0
- asyncviz/configuration/runtime_dashboard.py +40 -0
- asyncviz/configuration/runtime_defaults.py +61 -0
- asyncviz/configuration/runtime_diagnostics.py +94 -0
- asyncviz/configuration/runtime_environment.py +211 -0
- asyncviz/configuration/runtime_metadata.py +71 -0
- asyncviz/configuration/runtime_monitoring.py +33 -0
- asyncviz/configuration/runtime_network.py +31 -0
- asyncviz/configuration/runtime_observability.py +68 -0
- asyncviz/configuration/runtime_options.py +92 -0
- asyncviz/configuration/runtime_overrides.py +175 -0
- asyncviz/configuration/runtime_profiles.py +80 -0
- asyncviz/configuration/runtime_recording.py +50 -0
- asyncviz/configuration/runtime_replay.py +25 -0
- asyncviz/configuration/runtime_resolution.py +160 -0
- asyncviz/configuration/runtime_security.py +28 -0
- asyncviz/configuration/runtime_serialization.py +76 -0
- asyncviz/configuration/runtime_sources.py +46 -0
- asyncviz/configuration/runtime_tracing.py +64 -0
- asyncviz/configuration/runtime_validation.py +155 -0
- asyncviz/configuration/runtime_warning.py +25 -0
- asyncviz/dashboard/__init__.py +3 -0
- asyncviz/dashboard/app.py +448 -0
- asyncviz/dashboard/asgi.py +19 -0
- asyncviz/dashboard/assets/__init__.py +167 -0
- asyncviz/dashboard/assets/asset_build.py +85 -0
- asyncviz/dashboard/assets/asset_cache.py +90 -0
- asyncviz/dashboard/assets/asset_diagnostics.py +87 -0
- asyncviz/dashboard/assets/asset_export.py +42 -0
- asyncviz/dashboard/assets/asset_integrity.py +41 -0
- asyncviz/dashboard/assets/asset_layout.py +55 -0
- asyncviz/dashboard/assets/asset_manifest.py +118 -0
- asyncviz/dashboard/assets/asset_metadata.py +54 -0
- asyncviz/dashboard/assets/asset_observability.py +78 -0
- asyncviz/dashboard/assets/asset_packaging.py +58 -0
- asyncviz/dashboard/assets/asset_packaging_inspect.py +108 -0
- asyncviz/dashboard/assets/asset_publisher.py +188 -0
- asyncviz/dashboard/assets/asset_registry.py +70 -0
- asyncviz/dashboard/assets/asset_resolution.py +83 -0
- asyncviz/dashboard/assets/asset_tracing.py +61 -0
- asyncviz/dashboard/assets/asset_validation.py +153 -0
- asyncviz/dashboard/assets/asset_versioning.py +57 -0
- asyncviz/dashboard/dependencies.py +151 -0
- asyncviz/dashboard/exceptions.py +121 -0
- asyncviz/dashboard/frontend_serving/__init__.py +96 -0
- asyncviz/dashboard/frontend_serving/assets.py +148 -0
- asyncviz/dashboard/frontend_serving/cache.py +46 -0
- asyncviz/dashboard/frontend_serving/configuration.py +56 -0
- asyncviz/dashboard/frontend_serving/exceptions.py +35 -0
- asyncviz/dashboard/frontend_serving/manifest.py +142 -0
- asyncviz/dashboard/frontend_serving/metrics.py +137 -0
- asyncviz/dashboard/frontend_serving/models.py +72 -0
- asyncviz/dashboard/frontend_serving/packaging.py +30 -0
- asyncviz/dashboard/frontend_serving/service.py +294 -0
- asyncviz/dashboard/frontend_serving/spa.py +77 -0
- asyncviz/dashboard/health/__init__.py +92 -0
- asyncviz/dashboard/health/checks.py +155 -0
- asyncviz/dashboard/health/exceptions.py +19 -0
- asyncviz/dashboard/health/metrics.py +134 -0
- asyncviz/dashboard/health/models.py +182 -0
- asyncviz/dashboard/health/probes.py +365 -0
- asyncviz/dashboard/health/registry.py +130 -0
- asyncviz/dashboard/health/service.py +240 -0
- asyncviz/dashboard/health/status.py +81 -0
- asyncviz/dashboard/lifespan.py +244 -0
- asyncviz/dashboard/middleware/__init__.py +43 -0
- asyncviz/dashboard/middleware/correlation.py +49 -0
- asyncviz/dashboard/middleware/errors.py +60 -0
- asyncviz/dashboard/middleware/logging.py +55 -0
- asyncviz/dashboard/middleware/timing.py +78 -0
- asyncviz/dashboard/replay/__init__.py +11 -0
- asyncviz/dashboard/replay/dashboard_sink.py +211 -0
- asyncviz/dashboard/replay/replay_marker_derivation.py +383 -0
- asyncviz/dashboard/replay/replay_status_broadcaster.py +288 -0
- asyncviz/dashboard/routes/__init__.py +29 -0
- asyncviz/dashboard/routes/assets.py +44 -0
- asyncviz/dashboard/routes/configuration.py +57 -0
- asyncviz/dashboard/routes/executor.py +48 -0
- asyncviz/dashboard/routes/executor_metrics.py +55 -0
- asyncviz/dashboard/routes/gather.py +41 -0
- asyncviz/dashboard/routes/health.py +111 -0
- asyncviz/dashboard/routes/packaging.py +78 -0
- asyncviz/dashboard/routes/queue_metrics.py +59 -0
- asyncviz/dashboard/routes/queues.py +41 -0
- asyncviz/dashboard/routes/runtime.py +1124 -0
- asyncviz/dashboard/routes/semaphores.py +41 -0
- asyncviz/dashboard/routes/websocket.py +63 -0
- asyncviz/dashboard/runner.py +31 -0
- asyncviz/dashboard/snapshots/__init__.py +57 -0
- asyncviz/dashboard/snapshots/exceptions.py +18 -0
- asyncviz/dashboard/snapshots/hydration.py +268 -0
- asyncviz/dashboard/snapshots/metrics.py +121 -0
- asyncviz/dashboard/snapshots/models.py +185 -0
- asyncviz/dashboard/state/__init__.py +0 -0
- asyncviz/dashboard/state/backend.py +90 -0
- asyncviz/dashboard/state/backend_metrics.py +136 -0
- asyncviz/dashboard/state/metrics_state.py +37 -0
- asyncviz/dashboard/state/runtime_state.py +66 -0
- asyncviz/dashboard/static/.gitkeep +0 -0
- asyncviz/dashboard/static/assets/index-BoCBbGHF.js +68 -0
- asyncviz/dashboard/static/assets/index-DMU-teJh.css +1 -0
- asyncviz/dashboard/static/index.html +13 -0
- asyncviz/dashboard/websocket/__init__.py +0 -0
- asyncviz/dashboard/websocket/backpressure.py +30 -0
- asyncviz/dashboard/websocket/bridge.py +278 -0
- asyncviz/dashboard/websocket/client.py +50 -0
- asyncviz/dashboard/websocket/exceptions.py +29 -0
- asyncviz/dashboard/websocket/gateway.py +337 -0
- asyncviz/dashboard/websocket/handshake.py +99 -0
- asyncviz/dashboard/websocket/heartbeat.py +34 -0
- asyncviz/dashboard/websocket/manager.py +121 -0
- asyncviz/dashboard/websocket/metrics.py +116 -0
- asyncviz/dashboard/websocket/protocol.py +204 -0
- asyncviz/dashboard/websocket/session_manager.py +125 -0
- asyncviz/dashboard/websocket/sessions.py +129 -0
- asyncviz/dashboard/websocket/shutdown_filter.py +239 -0
- asyncviz/dashboard/websocket/streaming/__init__.py +49 -0
- asyncviz/dashboard/websocket/streaming/batching.py +30 -0
- asyncviz/dashboard/websocket/streaming/engine.py +244 -0
- asyncviz/dashboard/websocket/streaming/envelopes.py +64 -0
- asyncviz/dashboard/websocket/streaming/exceptions.py +13 -0
- asyncviz/dashboard/websocket/streaming/metrics.py +106 -0
- asyncviz/instrumentation/__init__.py +3 -0
- asyncviz/instrumentation/asyncio/__init__.py +13 -0
- asyncviz/instrumentation/asyncio/context.py +101 -0
- asyncviz/instrumentation/asyncio/create_task.py +89 -0
- asyncviz/instrumentation/asyncio/exceptions.py +13 -0
- asyncviz/instrumentation/asyncio/ids.py +13 -0
- asyncviz/instrumentation/asyncio/lifecycle.py +124 -0
- asyncviz/instrumentation/asyncio/metadata.py +36 -0
- asyncviz/instrumentation/asyncio/patcher.py +97 -0
- asyncviz/instrumentation/asyncio/wrappers.py +82 -0
- asyncviz/instrumentation/executor/__init__.py +85 -0
- asyncviz/instrumentation/executor/executor_configuration.py +27 -0
- asyncviz/instrumentation/executor/executor_diagnostics.py +97 -0
- asyncviz/instrumentation/executor/executor_internal.py +38 -0
- asyncviz/instrumentation/executor/executor_metadata.py +64 -0
- asyncviz/instrumentation/executor/executor_observability.py +137 -0
- asyncviz/instrumentation/executor/executor_patch.py +614 -0
- asyncviz/instrumentation/executor/executor_registry.py +292 -0
- asyncviz/instrumentation/executor/executor_state.py +53 -0
- asyncviz/instrumentation/executor/executor_tracing.py +61 -0
- asyncviz/instrumentation/executor/metrics/__init__.py +69 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_configuration.py +85 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_diagnostics.py +48 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_engine.py +438 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_models.py +160 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_observability.py +117 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_replay.py +30 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_saturation.py +123 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_state.py +229 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_statistics.py +83 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_throughput.py +67 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_tracing.py +59 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_utilization.py +58 -0
- asyncviz/instrumentation/executor/metrics/executor_metrics_windows.py +37 -0
- asyncviz/instrumentation/gather/__init__.py +72 -0
- asyncviz/instrumentation/gather/gather_configuration.py +33 -0
- asyncviz/instrumentation/gather/gather_diagnostics.py +70 -0
- asyncviz/instrumentation/gather/gather_internal.py +49 -0
- asyncviz/instrumentation/gather/gather_metadata.py +50 -0
- asyncviz/instrumentation/gather/gather_observability.py +137 -0
- asyncviz/instrumentation/gather/gather_patch.py +650 -0
- asyncviz/instrumentation/gather/gather_registry.py +175 -0
- asyncviz/instrumentation/gather/gather_tracing.py +67 -0
- asyncviz/instrumentation/queue/__init__.py +80 -0
- asyncviz/instrumentation/queue/metrics/__init__.py +86 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_backpressure.py +17 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_configuration.py +91 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_contention.py +82 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_diagnostics.py +53 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_engine.py +486 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_models.py +174 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_observability.py +129 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_pressure.py +133 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_replay.py +34 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_serialization.py +41 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_state.py +282 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_statistics.py +94 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_throughput.py +78 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_tracing.py +65 -0
- asyncviz/instrumentation/queue/metrics/queue_metrics_windows.py +42 -0
- asyncviz/instrumentation/queue/queue_configuration.py +48 -0
- asyncviz/instrumentation/queue/queue_diagnostics.py +70 -0
- asyncviz/instrumentation/queue/queue_internal.py +47 -0
- asyncviz/instrumentation/queue/queue_metadata.py +50 -0
- asyncviz/instrumentation/queue/queue_observability.py +107 -0
- asyncviz/instrumentation/queue/queue_patch.py +533 -0
- asyncviz/instrumentation/queue/queue_registry.py +133 -0
- asyncviz/instrumentation/queue/queue_state.py +59 -0
- asyncviz/instrumentation/queue/queue_tracing.py +59 -0
- asyncviz/instrumentation/semaphore/__init__.py +84 -0
- asyncviz/instrumentation/semaphore/semaphore_configuration.py +48 -0
- asyncviz/instrumentation/semaphore/semaphore_diagnostics.py +71 -0
- asyncviz/instrumentation/semaphore/semaphore_internal.py +34 -0
- asyncviz/instrumentation/semaphore/semaphore_metadata.py +64 -0
- asyncviz/instrumentation/semaphore/semaphore_observability.py +130 -0
- asyncviz/instrumentation/semaphore/semaphore_patch.py +565 -0
- asyncviz/instrumentation/semaphore/semaphore_registry.py +134 -0
- asyncviz/instrumentation/semaphore/semaphore_state.py +88 -0
- asyncviz/instrumentation/semaphore/semaphore_tracing.py +67 -0
- asyncviz/models/__init__.py +0 -0
- asyncviz/packaging/__init__.py +82 -0
- asyncviz/packaging/assets.py +195 -0
- asyncviz/packaging/build_metadata.py +215 -0
- asyncviz/packaging/diagnostics.py +116 -0
- asyncviz/packaging/utils/__init__.py +8 -0
- asyncviz/packaging/versioning.py +221 -0
- asyncviz/packaging/wheel_validation.py +236 -0
- asyncviz/py.typed +0 -0
- asyncviz/replay/__init__.py +14 -0
- asyncviz/replay/format/__init__.py +185 -0
- asyncviz/replay/format/models/__init__.py +31 -0
- asyncviz/replay/format/models/payloads.py +246 -0
- asyncviz/replay/format/ndjson_backpressure.py +94 -0
- asyncviz/replay/format/ndjson_deserialization.py +175 -0
- asyncviz/replay/format/ndjson_diagnostics.py +67 -0
- asyncviz/replay/format/ndjson_format.py +140 -0
- asyncviz/replay/format/ndjson_frame.py +236 -0
- asyncviz/replay/format/ndjson_integrity.py +101 -0
- asyncviz/replay/format/ndjson_observability.py +163 -0
- asyncviz/replay/format/ndjson_reader.py +103 -0
- asyncviz/replay/format/ndjson_recovery.py +113 -0
- asyncviz/replay/format/ndjson_registry.py +158 -0
- asyncviz/replay/format/ndjson_schema.py +90 -0
- asyncviz/replay/format/ndjson_serialization.py +101 -0
- asyncviz/replay/format/ndjson_streaming.py +122 -0
- asyncviz/replay/format/ndjson_tracing.py +95 -0
- asyncviz/replay/format/ndjson_validation.py +159 -0
- asyncviz/replay/format/ndjson_versioning.py +179 -0
- asyncviz/replay/format/ndjson_writer.py +98 -0
- asyncviz/replay/format/utils/__init__.py +9 -0
- asyncviz/replay/format/utils/canonical_json.py +82 -0
- asyncviz/replay/loading/__init__.py +202 -0
- asyncviz/replay/loading/models/__init__.py +23 -0
- asyncviz/replay/loading/models/frame_adapter.py +143 -0
- asyncviz/replay/loading/models/replay_session.py +77 -0
- asyncviz/replay/loading/replay_backpressure.py +59 -0
- asyncviz/replay/loading/replay_chunk_loader.py +118 -0
- asyncviz/replay/loading/replay_configuration.py +76 -0
- asyncviz/replay/loading/replay_cursor.py +76 -0
- asyncviz/replay/loading/replay_diagnostics.py +35 -0
- asyncviz/replay/loading/replay_filtering.py +147 -0
- asyncviz/replay/loading/replay_index.py +99 -0
- asyncviz/replay/loading/replay_integrity_loader.py +104 -0
- asyncviz/replay/loading/replay_iterator.py +52 -0
- asyncviz/replay/loading/replay_loader.py +369 -0
- asyncviz/replay/loading/replay_manifest_loader.py +135 -0
- asyncviz/replay/loading/replay_observability.py +173 -0
- asyncviz/replay/loading/replay_recovery_loader.py +129 -0
- asyncviz/replay/loading/replay_seek.py +226 -0
- asyncviz/replay/loading/replay_snapshot_index.py +104 -0
- asyncviz/replay/loading/replay_state_loader.py +155 -0
- asyncviz/replay/loading/replay_stream.py +92 -0
- asyncviz/replay/loading/replay_tracing.py +85 -0
- asyncviz/replay/loading/replay_validation_loader.py +77 -0
- asyncviz/replay/loading/replay_windowing.py +68 -0
- asyncviz/replay/loading/utils/__init__.py +8 -0
- asyncviz/replay/loading/utils/frame_navigation.py +47 -0
- asyncviz/replay/recording/__init__.py +159 -0
- asyncviz/replay/recording/recording_backpressure.py +105 -0
- asyncviz/replay/recording/recording_configuration.py +74 -0
- asyncviz/replay/recording/recording_diagnostics.py +83 -0
- asyncviz/replay/recording/recording_export.py +53 -0
- asyncviz/replay/recording/recording_index.py +112 -0
- asyncviz/replay/recording/recording_integrity.py +110 -0
- asyncviz/replay/recording/recording_layout.py +77 -0
- asyncviz/replay/recording/recording_manifest.py +65 -0
- asyncviz/replay/recording/recording_metadata.py +115 -0
- asyncviz/replay/recording/recording_observability.py +152 -0
- asyncviz/replay/recording/recording_paths.py +51 -0
- asyncviz/replay/recording/recording_recovery.py +166 -0
- asyncviz/replay/recording/recording_session.py +96 -0
- asyncviz/replay/recording/recording_stream.py +95 -0
- asyncviz/replay/recording/recording_tracing.py +68 -0
- asyncviz/replay/recording/recording_writer.py +399 -0
- asyncviz/replay/recording/runtime_recorder.py +322 -0
- asyncviz/replay/runtime/__init__.py +187 -0
- asyncviz/replay/runtime/control/__init__.py +137 -0
- asyncviz/replay/runtime/control/models/__init__.py +19 -0
- asyncviz/replay/runtime/control/models/pause_request.py +64 -0
- asyncviz/replay/runtime/control/models/playback_phase.py +87 -0
- asyncviz/replay/runtime/control/replay_clock_coordination.py +93 -0
- asyncviz/replay/runtime/control/replay_control_dispatch.py +152 -0
- asyncviz/replay/runtime/control/replay_pause_barrier.py +94 -0
- asyncviz/replay/runtime/control/replay_pause_controller.py +211 -0
- asyncviz/replay/runtime/control/replay_playback_backpressure.py +86 -0
- asyncviz/replay/runtime/control/replay_playback_configuration.py +80 -0
- asyncviz/replay/runtime/control/replay_playback_coordinator.py +365 -0
- asyncviz/replay/runtime/control/replay_playback_diagnostics.py +53 -0
- asyncviz/replay/runtime/control/replay_playback_gate.py +51 -0
- asyncviz/replay/runtime/control/replay_playback_observability.py +181 -0
- asyncviz/replay/runtime/control/replay_playback_state.py +122 -0
- asyncviz/replay/runtime/control/replay_playback_tracing.py +94 -0
- asyncviz/replay/runtime/control/replay_resume_barrier.py +84 -0
- asyncviz/replay/runtime/control/replay_resume_controller.py +136 -0
- asyncviz/replay/runtime/control/replay_scheduler_coordination.py +52 -0
- asyncviz/replay/runtime/control/replay_transition_guard.py +121 -0
- asyncviz/replay/runtime/control/utils/__init__.py +1 -0
- asyncviz/replay/runtime/models/__init__.py +15 -0
- asyncviz/replay/runtime/models/engine_cursor.py +72 -0
- asyncviz/replay/runtime/models/playback_state.py +47 -0
- asyncviz/replay/runtime/models/runtime_state.py +92 -0
- asyncviz/replay/runtime/replay_backpressure.py +87 -0
- asyncviz/replay/runtime/replay_checkpoint_runtime.py +83 -0
- asyncviz/replay/runtime/replay_clock.py +153 -0
- asyncviz/replay/runtime/replay_configuration.py +73 -0
- asyncviz/replay/runtime/replay_cursor_runtime.py +35 -0
- asyncviz/replay/runtime/replay_diagnostics.py +42 -0
- asyncviz/replay/runtime/replay_dispatch.py +111 -0
- asyncviz/replay/runtime/replay_event_router.py +83 -0
- asyncviz/replay/runtime/replay_integrity_runtime.py +83 -0
- asyncviz/replay/runtime/replay_observability.py +189 -0
- asyncviz/replay/runtime/replay_pause.py +95 -0
- asyncviz/replay/runtime/replay_playback.py +240 -0
- asyncviz/replay/runtime/replay_projection.py +104 -0
- asyncviz/replay/runtime/replay_reducers.py +122 -0
- asyncviz/replay/runtime/replay_runtime_engine.py +280 -0
- asyncviz/replay/runtime/replay_scheduler.py +101 -0
- asyncviz/replay/runtime/replay_seek_runtime.py +172 -0
- asyncviz/replay/runtime/replay_snapshot_runtime.py +80 -0
- asyncviz/replay/runtime/replay_speed.py +89 -0
- asyncviz/replay/runtime/replay_state_store.py +87 -0
- asyncviz/replay/runtime/replay_tracing.py +87 -0
- asyncviz/replay/runtime/replay_websocket_bridge.py +115 -0
- asyncviz/replay/runtime/seek/__init__.py +149 -0
- asyncviz/replay/runtime/seek/models/__init__.py +21 -0
- asyncviz/replay/runtime/seek/models/seek_cursor.py +40 -0
- asyncviz/replay/runtime/seek/models/seek_request.py +98 -0
- asyncviz/replay/runtime/seek/models/seek_state.py +71 -0
- asyncviz/replay/runtime/seek/replay_seek_backpressure.py +78 -0
- asyncviz/replay/runtime/seek/replay_seek_cache.py +112 -0
- asyncviz/replay/runtime/seek/replay_seek_checkpoint.py +50 -0
- asyncviz/replay/runtime/seek/replay_seek_clock.py +70 -0
- asyncviz/replay/runtime/seek/replay_seek_configuration.py +86 -0
- asyncviz/replay/runtime/seek/replay_seek_coordinator.py +318 -0
- asyncviz/replay/runtime/seek/replay_seek_cursor.py +30 -0
- asyncviz/replay/runtime/seek/replay_seek_diagnostics.py +48 -0
- asyncviz/replay/runtime/seek/replay_seek_dispatch.py +175 -0
- asyncviz/replay/runtime/seek/replay_seek_engine.py +166 -0
- asyncviz/replay/runtime/seek/replay_seek_integrity.py +74 -0
- asyncviz/replay/runtime/seek/replay_seek_observability.py +170 -0
- asyncviz/replay/runtime/seek/replay_seek_projection.py +50 -0
- asyncviz/replay/runtime/seek/replay_seek_reconstruction.py +160 -0
- asyncviz/replay/runtime/seek/replay_seek_scheduler.py +37 -0
- asyncviz/replay/runtime/seek/replay_seek_state.py +63 -0
- asyncviz/replay/runtime/seek/replay_seek_tracing.py +85 -0
- asyncviz/replay/runtime/seek/utils/__init__.py +5 -0
- asyncviz/replay/runtime/seek/utils/targets.py +55 -0
- asyncviz/replay/runtime/speed/__init__.py +143 -0
- asyncviz/replay/runtime/speed/models/__init__.py +23 -0
- asyncviz/replay/runtime/speed/models/speed_phase.py +61 -0
- asyncviz/replay/runtime/speed/models/speed_profile.py +73 -0
- asyncviz/replay/runtime/speed/models/speed_request.py +50 -0
- asyncviz/replay/runtime/speed/replay_speed_backpressure.py +80 -0
- asyncviz/replay/runtime/speed/replay_speed_clock.py +125 -0
- asyncviz/replay/runtime/speed/replay_speed_configuration.py +100 -0
- asyncviz/replay/runtime/speed/replay_speed_controller.py +221 -0
- asyncviz/replay/runtime/speed/replay_speed_coordination.py +86 -0
- asyncviz/replay/runtime/speed/replay_speed_diagnostics.py +59 -0
- asyncviz/replay/runtime/speed/replay_speed_dispatch.py +284 -0
- asyncviz/replay/runtime/speed/replay_speed_integrity.py +58 -0
- asyncviz/replay/runtime/speed/replay_speed_limits.py +84 -0
- asyncviz/replay/runtime/speed/replay_speed_observability.py +156 -0
- asyncviz/replay/runtime/speed/replay_speed_presets.py +34 -0
- asyncviz/replay/runtime/speed/replay_speed_profile.py +20 -0
- asyncviz/replay/runtime/speed/replay_speed_scheduler.py +33 -0
- asyncviz/replay/runtime/speed/replay_speed_state.py +80 -0
- asyncviz/replay/runtime/speed/replay_speed_tracing.py +83 -0
- asyncviz/replay/runtime/speed/replay_speed_transition.py +61 -0
- asyncviz/replay/runtime/speed/utils/__init__.py +1 -0
- asyncviz/replay/runtime/utils/__init__.py +5 -0
- asyncviz/replay/runtime/utils/timing.py +13 -0
- asyncviz/runtime/__init__.py +29 -0
- asyncviz/runtime/backpressure/__init__.py +177 -0
- asyncviz/runtime/backpressure/adaptive_backpressure.py +188 -0
- asyncviz/runtime/backpressure/backpressure_budget.py +90 -0
- asyncviz/runtime/backpressure/backpressure_configuration.py +149 -0
- asyncviz/runtime/backpressure/backpressure_diagnostics.py +49 -0
- asyncviz/runtime/backpressure/backpressure_integrity.py +74 -0
- asyncviz/runtime/backpressure/backpressure_observability.py +139 -0
- asyncviz/runtime/backpressure/backpressure_policy.py +143 -0
- asyncviz/runtime/backpressure/backpressure_queue.py +216 -0
- asyncviz/runtime/backpressure/backpressure_thresholds.py +49 -0
- asyncviz/runtime/backpressure/backpressure_tracing.py +92 -0
- asyncviz/runtime/backpressure/bounded_event_channel.py +96 -0
- asyncviz/runtime/backpressure/event_backpressure_controller.py +345 -0
- asyncviz/runtime/backpressure/models/__init__.py +27 -0
- asyncviz/runtime/backpressure/models/degradation_action.py +32 -0
- asyncviz/runtime/backpressure/models/overflow_marker.py +48 -0
- asyncviz/runtime/backpressure/models/overload_state.py +68 -0
- asyncviz/runtime/backpressure/models/pressure_signal.py +39 -0
- asyncviz/runtime/backpressure/overload_detector.py +205 -0
- asyncviz/runtime/backpressure/reducer_backpressure.py +102 -0
- asyncviz/runtime/backpressure/replay_backpressure.py +172 -0
- asyncviz/runtime/backpressure/topology_backpressure.py +87 -0
- asyncviz/runtime/backpressure/utils/__init__.py +9 -0
- asyncviz/runtime/backpressure/utils/hysteresis.py +27 -0
- asyncviz/runtime/backpressure/websocket_backpressure.py +195 -0
- asyncviz/runtime/clock/__init__.py +64 -0
- asyncviz/runtime/clock/clock.py +225 -0
- asyncviz/runtime/clock/conversions.py +40 -0
- asyncviz/runtime/clock/exceptions.py +22 -0
- asyncviz/runtime/clock/models.py +43 -0
- asyncviz/runtime/clock/sequence.py +49 -0
- asyncviz/runtime/clock/synchronization.py +53 -0
- asyncviz/runtime/clock/timestamps.py +120 -0
- asyncviz/runtime/compat/__init__.py +154 -0
- asyncviz/runtime/compat/loop_adapter.py +144 -0
- asyncviz/runtime/compat/loop_clock_bridge.py +138 -0
- asyncviz/runtime/compat/loop_configuration.py +95 -0
- asyncviz/runtime/compat/loop_diagnostics.py +70 -0
- asyncviz/runtime/compat/loop_feature_detection.py +146 -0
- asyncviz/runtime/compat/loop_integrity.py +107 -0
- asyncviz/runtime/compat/loop_observability.py +151 -0
- asyncviz/runtime/compat/loop_policy_bridge.py +125 -0
- asyncviz/runtime/compat/loop_queue_bridge.py +120 -0
- asyncviz/runtime/compat/loop_scheduler_bridge.py +133 -0
- asyncviz/runtime/compat/loop_task_bridge.py +162 -0
- asyncviz/runtime/compat/loop_tracing.py +75 -0
- asyncviz/runtime/compat/models/__init__.py +21 -0
- asyncviz/runtime/compat/models/loop_capabilities.py +85 -0
- asyncviz/runtime/compat/models/loop_kind.py +28 -0
- asyncviz/runtime/compat/models/loop_state.py +37 -0
- asyncviz/runtime/compat/replay_loop_bridge.py +136 -0
- asyncviz/runtime/compat/uvloop_compat.py +333 -0
- asyncviz/runtime/compat/websocket_loop_bridge.py +111 -0
- asyncviz/runtime/events/__init__.py +90 -0
- asyncviz/runtime/events/bus.py +231 -0
- asyncviz/runtime/events/dispatcher.py +64 -0
- asyncviz/runtime/events/event.py +10 -0
- asyncviz/runtime/events/exceptions.py +13 -0
- asyncviz/runtime/events/metrics.py +38 -0
- asyncviz/runtime/events/models/__init__.py +175 -0
- asyncviz/runtime/events/models/base.py +98 -0
- asyncviz/runtime/events/models/enums.py +121 -0
- asyncviz/runtime/events/models/executor.py +94 -0
- asyncviz/runtime/events/models/executor_metrics.py +112 -0
- asyncviz/runtime/events/models/factory.py +160 -0
- asyncviz/runtime/events/models/gather.py +121 -0
- asyncviz/runtime/events/models/metrics.py +15 -0
- asyncviz/runtime/events/models/queue.py +106 -0
- asyncviz/runtime/events/models/queue_metrics.py +140 -0
- asyncviz/runtime/events/models/runtime.py +23 -0
- asyncviz/runtime/events/models/semaphore.py +111 -0
- asyncviz/runtime/events/models/serialization.py +152 -0
- asyncviz/runtime/events/models/task.py +74 -0
- asyncviz/runtime/events/models/warnings.py +16 -0
- asyncviz/runtime/events/queue.py +49 -0
- asyncviz/runtime/events/subscriber.py +106 -0
- asyncviz/runtime/lineage/__init__.py +99 -0
- asyncviz/runtime/lineage/ancestry.py +147 -0
- asyncviz/runtime/lineage/context.py +71 -0
- asyncviz/runtime/lineage/exceptions.py +31 -0
- asyncviz/runtime/lineage/graph.py +85 -0
- asyncviz/runtime/lineage/models.py +53 -0
- asyncviz/runtime/lineage/propagation.py +60 -0
- asyncviz/runtime/lineage/snapshots.py +24 -0
- asyncviz/runtime/lineage/tracker.py +223 -0
- asyncviz/runtime/memory/__init__.py +165 -0
- asyncviz/runtime/memory/compact_event_models.py +11 -0
- asyncviz/runtime/memory/event_compaction.py +54 -0
- asyncviz/runtime/memory/event_deduplication.py +81 -0
- asyncviz/runtime/memory/event_interning.py +122 -0
- asyncviz/runtime/memory/event_memory_layout.py +125 -0
- asyncviz/runtime/memory/event_pooling.py +168 -0
- asyncviz/runtime/memory/memory_backpressure.py +44 -0
- asyncviz/runtime/memory/memory_configuration.py +112 -0
- asyncviz/runtime/memory/memory_diagnostics.py +52 -0
- asyncviz/runtime/memory/memory_observability.py +216 -0
- asyncviz/runtime/memory/memory_optimizer.py +248 -0
- asyncviz/runtime/memory/memory_thresholds.py +91 -0
- asyncviz/runtime/memory/memory_tracing.py +89 -0
- asyncviz/runtime/memory/models/__init__.py +15 -0
- asyncviz/runtime/memory/models/compact_event.py +80 -0
- asyncviz/runtime/memory/models/compact_frame.py +55 -0
- asyncviz/runtime/memory/models/pool_token.py +25 -0
- asyncviz/runtime/memory/reducer_memory.py +135 -0
- asyncviz/runtime/memory/replay_compaction.py +88 -0
- asyncviz/runtime/memory/replay_memory_layout.py +63 -0
- asyncviz/runtime/memory/topology_memory.py +123 -0
- asyncviz/runtime/memory/utils/__init__.py +1 -0
- asyncviz/runtime/memory/websocket_memory.py +112 -0
- asyncviz/runtime/metrics/__init__.py +126 -0
- asyncviz/runtime/metrics/aggregator.py +385 -0
- asyncviz/runtime/metrics/counters.py +56 -0
- asyncviz/runtime/metrics/durations.py +86 -0
- asyncviz/runtime/metrics/exceptions.py +13 -0
- asyncviz/runtime/metrics/histograms.py +142 -0
- asyncviz/runtime/metrics/lineage.py +69 -0
- asyncviz/runtime/metrics/models.py +169 -0
- asyncviz/runtime/metrics/normalization.py +77 -0
- asyncviz/runtime/metrics/projections.py +89 -0
- asyncviz/runtime/metrics/queries.py +49 -0
- asyncviz/runtime/metrics/rates.py +90 -0
- asyncviz/runtime/metrics/reducers.py +94 -0
- asyncviz/runtime/metrics/snapshots.py +197 -0
- asyncviz/runtime/metrics/streaming.py +90 -0
- asyncviz/runtime/monitoring/__init__.py +94 -0
- asyncviz/runtime/monitoring/blocking/__init__.py +157 -0
- asyncviz/runtime/monitoring/blocking/blocking_backpressure.py +82 -0
- asyncviz/runtime/monitoring/blocking/blocking_classifier.py +121 -0
- asyncviz/runtime/monitoring/blocking/blocking_configuration.py +81 -0
- asyncviz/runtime/monitoring/blocking/blocking_cooldown.py +149 -0
- asyncviz/runtime/monitoring/blocking/blocking_detector.py +655 -0
- asyncviz/runtime/monitoring/blocking/blocking_diagnostics.py +131 -0
- asyncviz/runtime/monitoring/blocking/blocking_escalation.py +152 -0
- asyncviz/runtime/monitoring/blocking/blocking_events.py +136 -0
- asyncviz/runtime/monitoring/blocking/blocking_metrics.py +208 -0
- asyncviz/runtime/monitoring/blocking/blocking_observability.py +45 -0
- asyncviz/runtime/monitoring/blocking/blocking_replay.py +39 -0
- asyncviz/runtime/monitoring/blocking/blocking_state.py +56 -0
- asyncviz/runtime/monitoring/blocking/blocking_statistics.py +193 -0
- asyncviz/runtime/monitoring/blocking/blocking_thresholds.py +79 -0
- asyncviz/runtime/monitoring/blocking/blocking_tracing.py +78 -0
- asyncviz/runtime/monitoring/blocking/blocking_windows.py +322 -0
- asyncviz/runtime/monitoring/blocking/models/__init__.py +35 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/__init__.py +154 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/models/__init__.py +39 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_backpressure.py +81 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_configuration.py +80 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_context.py +135 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_diagnostics.py +115 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_engine.py +605 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_events.py +46 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_filters.py +96 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_frames.py +163 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_limits.py +54 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_metrics.py +176 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_observability.py +38 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_policy.py +181 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_replay.py +111 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_sampler.py +234 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_serializer.py +104 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_statistics.py +153 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/stack_capture_tracing.py +69 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/tests/__init__.py +1 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/utils/__init__.py +8 -0
- asyncviz/runtime/monitoring/blocking/stack_capture/utils/synthetic_frames.py +38 -0
- asyncviz/runtime/monitoring/blocking/tests/__init__.py +1 -0
- asyncviz/runtime/monitoring/blocking/utils/__init__.py +10 -0
- asyncviz/runtime/monitoring/event_loop/__init__.py +100 -0
- asyncviz/runtime/monitoring/event_loop/lag_backpressure.py +108 -0
- asyncviz/runtime/monitoring/event_loop/lag_clock.py +117 -0
- asyncviz/runtime/monitoring/event_loop/lag_configuration.py +133 -0
- asyncviz/runtime/monitoring/event_loop/lag_diagnostics.py +114 -0
- asyncviz/runtime/monitoring/event_loop/lag_events.py +104 -0
- asyncviz/runtime/monitoring/event_loop/lag_measurement.py +112 -0
- asyncviz/runtime/monitoring/event_loop/lag_metrics.py +184 -0
- asyncviz/runtime/monitoring/event_loop/lag_monitor.py +498 -0
- asyncviz/runtime/monitoring/event_loop/lag_observability.py +47 -0
- asyncviz/runtime/monitoring/event_loop/lag_sampler.py +69 -0
- asyncviz/runtime/monitoring/event_loop/lag_scheduler.py +285 -0
- asyncviz/runtime/monitoring/event_loop/lag_state.py +67 -0
- asyncviz/runtime/monitoring/event_loop/lag_statistics.py +261 -0
- asyncviz/runtime/monitoring/event_loop/lag_thresholds.py +166 -0
- asyncviz/runtime/monitoring/event_loop/lag_tracing.py +86 -0
- asyncviz/runtime/monitoring/event_loop/models/__init__.py +30 -0
- asyncviz/runtime/monitoring/event_loop/tests/__init__.py +6 -0
- asyncviz/runtime/monitoring/event_loop/utils/__init__.py +9 -0
- asyncviz/runtime/monitoring/event_loop/utils/fake_clock.py +54 -0
- asyncviz/runtime/queue/__init__.py +64 -0
- asyncviz/runtime/queue/backpressure.py +29 -0
- asyncviz/runtime/queue/buffering.py +23 -0
- asyncviz/runtime/queue/channels.py +65 -0
- asyncviz/runtime/queue/dispatcher.py +109 -0
- asyncviz/runtime/queue/event_queue.py +348 -0
- asyncviz/runtime/queue/exceptions.py +26 -0
- asyncviz/runtime/queue/metrics.py +140 -0
- asyncviz/runtime/queue/retention.py +110 -0
- asyncviz/runtime/queue/snapshots.py +42 -0
- asyncviz/runtime/replay/__init__.py +86 -0
- asyncviz/runtime/replay/artifacts/__init__.py +53 -0
- asyncviz/runtime/replay/artifacts/replay_bundle.py +81 -0
- asyncviz/runtime/replay/artifacts/replay_index.py +54 -0
- asyncviz/runtime/replay/artifacts/replay_layout.py +72 -0
- asyncviz/runtime/replay/artifacts/replay_validation.py +173 -0
- asyncviz/runtime/replay/buffer.py +426 -0
- asyncviz/runtime/replay/checkpoints.py +108 -0
- asyncviz/runtime/replay/exceptions.py +22 -0
- asyncviz/runtime/replay/frames.py +68 -0
- asyncviz/runtime/replay/indexing.py +75 -0
- asyncviz/runtime/replay/models.py +103 -0
- asyncviz/runtime/replay/reconstruction.py +53 -0
- asyncviz/runtime/replay/recorder/__init__.py +129 -0
- asyncviz/runtime/replay/recorder/replay_backpressure.py +112 -0
- asyncviz/runtime/replay/recorder/replay_chunking.py +41 -0
- asyncviz/runtime/replay/recorder/replay_compression.py +44 -0
- asyncviz/runtime/replay/recorder/replay_configuration.py +85 -0
- asyncviz/runtime/replay/recorder/replay_diagnostics.py +42 -0
- asyncviz/runtime/replay/recorder/replay_export.py +177 -0
- asyncviz/runtime/replay/recorder/replay_integrity.py +55 -0
- asyncviz/runtime/replay/recorder/replay_manifest.py +144 -0
- asyncviz/runtime/replay/recorder/replay_metadata.py +82 -0
- asyncviz/runtime/replay/recorder/replay_metrics.py +96 -0
- asyncviz/runtime/replay/recorder/replay_recorder.py +415 -0
- asyncviz/runtime/replay/recorder/replay_serializer.py +34 -0
- asyncviz/runtime/replay/recorder/replay_statistics.py +86 -0
- asyncviz/runtime/replay/recorder/replay_tracing.py +65 -0
- asyncviz/runtime/replay/recorder/replay_writer.py +169 -0
- asyncviz/runtime/replay/retention.py +117 -0
- asyncviz/runtime/replay/streaming.py +67 -0
- asyncviz/runtime/resilience/__init__.py +183 -0
- asyncviz/runtime/resilience/circuit_breaker.py +195 -0
- asyncviz/runtime/resilience/degradation_policy.py +45 -0
- asyncviz/runtime/resilience/failure_classifier.py +94 -0
- asyncviz/runtime/resilience/failure_domain.py +176 -0
- asyncviz/runtime/resilience/isolation_backpressure.py +119 -0
- asyncviz/runtime/resilience/isolation_configuration.py +239 -0
- asyncviz/runtime/resilience/isolation_diagnostics.py +61 -0
- asyncviz/runtime/resilience/isolation_integrity.py +88 -0
- asyncviz/runtime/resilience/isolation_observability.py +171 -0
- asyncviz/runtime/resilience/isolation_tracing.py +77 -0
- asyncviz/runtime/resilience/models/__init__.py +35 -0
- asyncviz/runtime/resilience/models/breaker_state.py +25 -0
- asyncviz/runtime/resilience/models/failure_event.py +27 -0
- asyncviz/runtime/resilience/models/failure_kind.py +42 -0
- asyncviz/runtime/resilience/models/recovery_outcome.py +23 -0
- asyncviz/runtime/resilience/models/subsystem_id.py +32 -0
- asyncviz/runtime/resilience/recorder_failure_isolation.py +66 -0
- asyncviz/runtime/resilience/recovery_supervisor.py +215 -0
- asyncviz/runtime/resilience/reducer_failure_isolation.py +60 -0
- asyncviz/runtime/resilience/render_failure_isolation.py +67 -0
- asyncviz/runtime/resilience/replay_failure_isolation.py +82 -0
- asyncviz/runtime/resilience/runtime_failure_manager.py +472 -0
- asyncviz/runtime/resilience/subsystem_boundary.py +195 -0
- asyncviz/runtime/resilience/websocket_failure_isolation.py +89 -0
- asyncviz/runtime/sampling/__init__.py +153 -0
- asyncviz/runtime/sampling/adaptive_sampling.py +126 -0
- asyncviz/runtime/sampling/event_sampler.py +164 -0
- asyncviz/runtime/sampling/models/__init__.py +23 -0
- asyncviz/runtime/sampling/models/sampling_decision.py +41 -0
- asyncviz/runtime/sampling/models/sampling_marker.py +54 -0
- asyncviz/runtime/sampling/models/sampling_priority.py +92 -0
- asyncviz/runtime/sampling/replay_sampling.py +131 -0
- asyncviz/runtime/sampling/sampling_backpressure.py +95 -0
- asyncviz/runtime/sampling/sampling_budget.py +88 -0
- asyncviz/runtime/sampling/sampling_configuration.py +137 -0
- asyncviz/runtime/sampling/sampling_diagnostics.py +52 -0
- asyncviz/runtime/sampling/sampling_integrity.py +73 -0
- asyncviz/runtime/sampling/sampling_observability.py +184 -0
- asyncviz/runtime/sampling/sampling_policy.py +184 -0
- asyncviz/runtime/sampling/sampling_priority.py +14 -0
- asyncviz/runtime/sampling/sampling_statistics.py +87 -0
- asyncviz/runtime/sampling/sampling_thresholds.py +109 -0
- asyncviz/runtime/sampling/sampling_tracing.py +87 -0
- asyncviz/runtime/sampling/topology_sampling.py +60 -0
- asyncviz/runtime/sampling/utils/__init__.py +8 -0
- asyncviz/runtime/sampling/utils/hashing.py +41 -0
- asyncviz/runtime/sampling/websocket_sampling.py +116 -0
- asyncviz/runtime/shutdown/__init__.py +73 -0
- asyncviz/runtime/shutdown/coordinator.py +603 -0
- asyncviz/runtime/shutdown/exceptions.py +32 -0
- asyncviz/runtime/shutdown/metrics.py +154 -0
- asyncviz/runtime/shutdown/models.py +85 -0
- asyncviz/runtime/shutdown/status.py +65 -0
- asyncviz/runtime/shutdown/timeouts.py +50 -0
- asyncviz/runtime/state/__init__.py +128 -0
- asyncviz/runtime/state/exceptions.py +22 -0
- asyncviz/runtime/state/indexes.py +92 -0
- asyncviz/runtime/state/lifecycle.py +30 -0
- asyncviz/runtime/state/metrics.py +156 -0
- asyncviz/runtime/state/models.py +102 -0
- asyncviz/runtime/state/normalization.py +66 -0
- asyncviz/runtime/state/projections.py +168 -0
- asyncviz/runtime/state/queries.py +55 -0
- asyncviz/runtime/state/reconciliation.py +90 -0
- asyncviz/runtime/state/reducers/__init__.py +218 -0
- asyncviz/runtime/state/reducers/base.py +90 -0
- asyncviz/runtime/state/reducers/exceptions.py +32 -0
- asyncviz/runtime/state/reducers/lifecycle.py +148 -0
- asyncviz/runtime/state/reducers/metrics.py +106 -0
- asyncviz/runtime/state/reducers/projections.py +69 -0
- asyncviz/runtime/state/reducers/reconciliation.py +46 -0
- asyncviz/runtime/state/reducers/registry.py +110 -0
- asyncviz/runtime/state/reducers/task_cancelled.py +30 -0
- asyncviz/runtime/state/reducers/task_completed.py +30 -0
- asyncviz/runtime/state/reducers/task_created.py +60 -0
- asyncviz/runtime/state/reducers/task_failed.py +28 -0
- asyncviz/runtime/state/reducers/task_resumed.py +22 -0
- asyncviz/runtime/state/reducers/task_started.py +22 -0
- asyncviz/runtime/state/reducers/task_waiting.py +22 -0
- asyncviz/runtime/state/reducers/transitions.py +140 -0
- asyncviz/runtime/state/reducers/validation.py +109 -0
- asyncviz/runtime/state/snapshots.py +94 -0
- asyncviz/runtime/state/store.py +317 -0
- asyncviz/runtime/state/subscriptions.py +90 -0
- asyncviz/runtime/tasks/__init__.py +38 -0
- asyncviz/runtime/tasks/exceptions.py +35 -0
- asyncviz/runtime/tasks/indexing.py +79 -0
- asyncviz/runtime/tasks/metrics.py +147 -0
- asyncviz/runtime/tasks/models.py +149 -0
- asyncviz/runtime/tasks/registry.py +386 -0
- asyncviz/runtime/tasks/snapshots.py +17 -0
- asyncviz/runtime/tasks/state.py +53 -0
- asyncviz/runtime/timeline/__init__.py +142 -0
- asyncviz/runtime/timeline/buffering.py +88 -0
- asyncviz/runtime/timeline/engine.py +400 -0
- asyncviz/runtime/timeline/exceptions.py +22 -0
- asyncviz/runtime/timeline/lifecycle.py +87 -0
- asyncviz/runtime/timeline/metrics.py +109 -0
- asyncviz/runtime/timeline/models.py +127 -0
- asyncviz/runtime/timeline/normalization.py +62 -0
- asyncviz/runtime/timeline/projections.py +97 -0
- asyncviz/runtime/timeline/queries.py +76 -0
- asyncviz/runtime/timeline/reconstruction.py +96 -0
- asyncviz/runtime/timeline/reducers.py +215 -0
- asyncviz/runtime/timeline/segments.py +58 -0
- asyncviz/runtime/timeline/snapshots.py +93 -0
- asyncviz/runtime/timeline/spans.py +67 -0
- asyncviz/runtime/timeline/streaming.py +103 -0
- asyncviz/runtime/warnings/__init__.py +131 -0
- asyncviz/runtime/warnings/blocking/__init__.py +167 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_backpressure.py +81 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_configuration.py +82 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_correlation.py +74 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_deduplication.py +119 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_diagnostics.py +122 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_emitter.py +759 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_events.py +89 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_grouping.py +323 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_metrics.py +214 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_observability.py +40 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_payloads.py +126 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_policy.py +91 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_replay.py +99 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_router.py +107 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_state.py +96 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_statistics.py +183 -0
- asyncviz/runtime/warnings/blocking/blocking_warning_tracing.py +74 -0
- asyncviz/runtime/warnings/blocking/models/__init__.py +43 -0
- asyncviz/runtime/warnings/blocking/tests/__init__.py +1 -0
- asyncviz/runtime/warnings/blocking/utils/__init__.py +13 -0
- asyncviz/runtime/warnings/blocking/utils/synthetic_outcomes.py +156 -0
- asyncviz/runtime/warnings/deduplication.py +68 -0
- asyncviz/runtime/warnings/detectors.py +785 -0
- asyncviz/runtime/warnings/exceptions.py +17 -0
- asyncviz/runtime/warnings/expiration.py +35 -0
- asyncviz/runtime/warnings/lifecycle.py +98 -0
- asyncviz/runtime/warnings/manager.py +450 -0
- asyncviz/runtime/warnings/models.py +106 -0
- asyncviz/runtime/warnings/normalization.py +40 -0
- asyncviz/runtime/warnings/projections.py +58 -0
- asyncviz/runtime/warnings/queries.py +48 -0
- asyncviz/runtime/warnings/severity.py +42 -0
- asyncviz/runtime/warnings/snapshots.py +85 -0
- asyncviz/runtime/warnings/streaming.py +84 -0
- asyncviz/start.py +9 -0
- asyncviz/stress/__init__.py +238 -0
- asyncviz/stress/_builtin_scenarios.py +239 -0
- asyncviz/stress/diagnostics/__init__.py +15 -0
- asyncviz/stress/executor_storms/__init__.py +7 -0
- asyncviz/stress/executor_storms/executor_fanout_storm.py +31 -0
- asyncviz/stress/failure_injection/__init__.py +13 -0
- asyncviz/stress/failure_injection/failure_registry.py +119 -0
- asyncviz/stress/fixtures/__init__.py +46 -0
- asyncviz/stress/harness/__init__.py +8 -0
- asyncviz/stress/harness/scenario_context.py +97 -0
- asyncviz/stress/models/__init__.py +27 -0
- asyncviz/stress/models/stress_outcome.py +51 -0
- asyncviz/stress/models/stress_scenario.py +45 -0
- asyncviz/stress/models/stress_signal.py +35 -0
- asyncviz/stress/observability/__init__.py +17 -0
- asyncviz/stress/queue_storms/__init__.py +7 -0
- asyncviz/stress/queue_storms/queue_saturation_storm.py +53 -0
- asyncviz/stress/rendering_storms/__init__.py +13 -0
- asyncviz/stress/rendering_storms/overlay_explosion_storm.py +32 -0
- asyncviz/stress/rendering_storms/render_flood_storm.py +57 -0
- asyncviz/stress/replay_storms/__init__.py +5 -0
- asyncviz/stress/replay_storms/replay_scrub_storm.py +31 -0
- asyncviz/stress/scalability_reports/__init__.py +15 -0
- asyncviz/stress/scalability_reports/scalability_report.py +260 -0
- asyncviz/stress/semaphore_storms/__init__.py +7 -0
- asyncviz/stress/semaphore_storms/semaphore_contention_storm.py +31 -0
- asyncviz/stress/stress_configuration.py +181 -0
- asyncviz/stress/stress_diagnostics.py +42 -0
- asyncviz/stress/stress_integrity.py +94 -0
- asyncviz/stress/stress_observability.py +219 -0
- asyncviz/stress/stress_registry.py +145 -0
- asyncviz/stress/stress_runner.py +302 -0
- asyncviz/stress/stress_thresholds.py +161 -0
- asyncviz/stress/stress_tracing.py +78 -0
- asyncviz/stress/synthetic/__init__.py +5 -0
- asyncviz/stress/synthetic/synthetic_loop_storm.py +22 -0
- asyncviz/stress/task_storms/__init__.py +13 -0
- asyncviz/stress/task_storms/cancellation_storm.py +43 -0
- asyncviz/stress/task_storms/gather_storm.py +32 -0
- asyncviz/stress/task_storms/task_creation_storm.py +41 -0
- asyncviz/stress/task_storms/task_lifecycle_storm.py +55 -0
- asyncviz/stress/topology_storms/__init__.py +7 -0
- asyncviz/stress/topology_storms/topology_explosion_storm.py +41 -0
- asyncviz/stress/utils/__init__.py +5 -0
- asyncviz/stress/utils/deterministic_rng.py +61 -0
- asyncviz/stress/websocket_floods/__init__.py +11 -0
- asyncviz/stress/websocket_floods/replay_stream_flood.py +38 -0
- asyncviz/stress/websocket_floods/websocket_flood.py +82 -0
- asyncviz/stress/workload_generators/__init__.py +31 -0
- asyncviz/stress/workload_generators/event_workload.py +77 -0
- asyncviz/stress/workload_generators/payload_workload.py +54 -0
- asyncviz/stress/workload_generators/task_workload.py +69 -0
- asyncviz/stress/workload_generators/topology_workload.py +53 -0
- asyncviz/utils/__init__.py +0 -0
- asyncviz/utils/env.py +62 -0
- asyncviz/utils/logging.py +26 -0
- asyncviz/websocket/__init__.py +0 -0
- asyncviz-0.1.0.dist-info/METADATA +369 -0
- asyncviz-0.1.0.dist-info/RECORD +927 -0
- asyncviz-0.1.0.dist-info/WHEEL +4 -0
- asyncviz-0.1.0.dist-info/entry_points.txt +2 -0
- asyncviz-0.1.0.dist-info/licenses/LICENSE +21 -0
asyncviz/__init__.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from asyncviz.bootstrap import (
|
|
2
|
+
AsyncVizError,
|
|
3
|
+
AsyncVizRuntime,
|
|
4
|
+
ConfigError,
|
|
5
|
+
PortInUseError,
|
|
6
|
+
StartupError,
|
|
7
|
+
StartupTimeoutError,
|
|
8
|
+
get_runtime,
|
|
9
|
+
is_running,
|
|
10
|
+
start,
|
|
11
|
+
stop,
|
|
12
|
+
)
|
|
13
|
+
from asyncviz.config import AsyncVizConfig
|
|
14
|
+
from asyncviz.packaging import package_version
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"AsyncVizConfig",
|
|
18
|
+
"AsyncVizError",
|
|
19
|
+
"AsyncVizRuntime",
|
|
20
|
+
"ConfigError",
|
|
21
|
+
"PortInUseError",
|
|
22
|
+
"StartupError",
|
|
23
|
+
"StartupTimeoutError",
|
|
24
|
+
"get_runtime",
|
|
25
|
+
"is_running",
|
|
26
|
+
"start",
|
|
27
|
+
"stop",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
#: Resolved at import time from installed-distribution metadata when
|
|
31
|
+
#: available, falling back to the in-repo literal for editable /
|
|
32
|
+
#: source-tree usage. Single source of truth — never edit this string
|
|
33
|
+
#: directly; bump
|
|
34
|
+
#: :data:`asyncviz.packaging.versioning._FALLBACK_VERSION` together
|
|
35
|
+
#: with ``[project].version`` in ``pyproject.toml``.
|
|
36
|
+
__version__ = package_version()
|
asyncviz/__main__.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""``python -m asyncviz`` entry point.
|
|
2
|
+
|
|
3
|
+
Delegates to the canonical CLI dispatcher in :mod:`asyncviz.cli`.
|
|
4
|
+
Kept tiny so a future plugin system can replace ``run_cli`` without
|
|
5
|
+
touching the module path users invoke from the shell.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
from asyncviz.cli import run_cli
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def main() -> int:
|
|
16
|
+
"""Process entry point — returns the exit code without calling sys.exit."""
|
|
17
|
+
return run_cli()
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
if __name__ == "__main__":
|
|
21
|
+
sys.exit(main())
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"""Canonical AsyncViz benchmarking layer.
|
|
2
|
+
|
|
3
|
+
Public API:
|
|
4
|
+
|
|
5
|
+
* :func:`benchmark` — decorator for registering benchmarks.
|
|
6
|
+
* :class:`BenchmarkRunner` — orchestrates warmup + measurement.
|
|
7
|
+
* :class:`BenchmarkConfig` — runner configuration.
|
|
8
|
+
* :func:`run_all` — convenience for "run every registered benchmark".
|
|
9
|
+
|
|
10
|
+
Lower-level pieces live under the submodules (statistics, baselines,
|
|
11
|
+
reporting, profiling).
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from asyncviz.benchmarks.benchmark_baselines import (
|
|
15
|
+
BaselineFile,
|
|
16
|
+
read_baseline,
|
|
17
|
+
write_baseline,
|
|
18
|
+
)
|
|
19
|
+
from asyncviz.benchmarks.benchmark_configuration import (
|
|
20
|
+
DEFAULT_MEASURED_ITERATIONS,
|
|
21
|
+
DEFAULT_REGRESSION_THRESHOLD,
|
|
22
|
+
DEFAULT_WARMUP_ITERATIONS,
|
|
23
|
+
BenchmarkConfig,
|
|
24
|
+
OutlierPolicy,
|
|
25
|
+
default_config,
|
|
26
|
+
quick_config,
|
|
27
|
+
)
|
|
28
|
+
from asyncviz.benchmarks.benchmark_diagnostics import (
|
|
29
|
+
BenchmarkDiagnostics,
|
|
30
|
+
build_benchmark_diagnostics,
|
|
31
|
+
)
|
|
32
|
+
from asyncviz.benchmarks.benchmark_models import (
|
|
33
|
+
BaselineComparison,
|
|
34
|
+
BenchmarkCategory,
|
|
35
|
+
BenchmarkEnvironment,
|
|
36
|
+
BenchmarkKind,
|
|
37
|
+
BenchmarkOutcome,
|
|
38
|
+
BenchmarkResult,
|
|
39
|
+
BenchmarkSample,
|
|
40
|
+
BenchmarkSpec,
|
|
41
|
+
BenchmarkStatistics,
|
|
42
|
+
BenchmarkSuiteResult,
|
|
43
|
+
)
|
|
44
|
+
from asyncviz.benchmarks.benchmark_observability import (
|
|
45
|
+
BenchmarkMetricsSnapshot,
|
|
46
|
+
get_benchmark_metrics,
|
|
47
|
+
get_benchmark_metrics_snapshot,
|
|
48
|
+
reset_benchmark_metrics,
|
|
49
|
+
)
|
|
50
|
+
from asyncviz.benchmarks.benchmark_registry import (
|
|
51
|
+
benchmark,
|
|
52
|
+
get_registry,
|
|
53
|
+
reset_registry,
|
|
54
|
+
)
|
|
55
|
+
from asyncviz.benchmarks.benchmark_runner import BenchmarkRunner
|
|
56
|
+
from asyncviz.benchmarks.benchmark_statistics import (
|
|
57
|
+
aggregate_samples,
|
|
58
|
+
apply_outlier_policy,
|
|
59
|
+
)
|
|
60
|
+
from asyncviz.benchmarks.benchmark_thresholds import (
|
|
61
|
+
RegressionSummary,
|
|
62
|
+
is_regression,
|
|
63
|
+
label_for,
|
|
64
|
+
summarize_regressions,
|
|
65
|
+
)
|
|
66
|
+
from asyncviz.benchmarks.benchmark_tracing import (
|
|
67
|
+
BenchmarkTraceEntry,
|
|
68
|
+
BenchmarkTraceKind,
|
|
69
|
+
clear_benchmark_trace,
|
|
70
|
+
get_benchmark_trace,
|
|
71
|
+
is_benchmark_trace_enabled,
|
|
72
|
+
record_benchmark_trace,
|
|
73
|
+
set_benchmark_trace_enabled,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def run_all(
|
|
78
|
+
*,
|
|
79
|
+
config: BenchmarkConfig | None = None,
|
|
80
|
+
baselines: dict[str, int] | None = None,
|
|
81
|
+
name_prefix: str | None = None,
|
|
82
|
+
category: BenchmarkCategory | None = None,
|
|
83
|
+
) -> BenchmarkSuiteResult:
|
|
84
|
+
"""Run every registered benchmark + return the suite result.
|
|
85
|
+
|
|
86
|
+
Filtering: ``name_prefix`` keeps only benchmarks whose names
|
|
87
|
+
start with the prefix; ``category`` restricts to a single
|
|
88
|
+
category. Both can be combined.
|
|
89
|
+
"""
|
|
90
|
+
runner = BenchmarkRunner(config=config, baselines=baselines)
|
|
91
|
+
specs = get_registry().filtered(
|
|
92
|
+
category=category,
|
|
93
|
+
name_prefix=name_prefix,
|
|
94
|
+
)
|
|
95
|
+
return runner.run_suite(specs)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
__all__ = [
|
|
99
|
+
"DEFAULT_MEASURED_ITERATIONS",
|
|
100
|
+
"DEFAULT_REGRESSION_THRESHOLD",
|
|
101
|
+
"DEFAULT_WARMUP_ITERATIONS",
|
|
102
|
+
"BaselineComparison",
|
|
103
|
+
"BaselineFile",
|
|
104
|
+
"BenchmarkCategory",
|
|
105
|
+
"BenchmarkConfig",
|
|
106
|
+
"BenchmarkDiagnostics",
|
|
107
|
+
"BenchmarkEnvironment",
|
|
108
|
+
"BenchmarkKind",
|
|
109
|
+
"BenchmarkMetricsSnapshot",
|
|
110
|
+
"BenchmarkOutcome",
|
|
111
|
+
"BenchmarkResult",
|
|
112
|
+
"BenchmarkRunner",
|
|
113
|
+
"BenchmarkSample",
|
|
114
|
+
"BenchmarkSpec",
|
|
115
|
+
"BenchmarkStatistics",
|
|
116
|
+
"BenchmarkSuiteResult",
|
|
117
|
+
"BenchmarkTraceEntry",
|
|
118
|
+
"BenchmarkTraceKind",
|
|
119
|
+
"OutlierPolicy",
|
|
120
|
+
"RegressionSummary",
|
|
121
|
+
"aggregate_samples",
|
|
122
|
+
"apply_outlier_policy",
|
|
123
|
+
"benchmark",
|
|
124
|
+
"build_benchmark_diagnostics",
|
|
125
|
+
"clear_benchmark_trace",
|
|
126
|
+
"default_config",
|
|
127
|
+
"get_benchmark_metrics",
|
|
128
|
+
"get_benchmark_metrics_snapshot",
|
|
129
|
+
"get_benchmark_trace",
|
|
130
|
+
"get_registry",
|
|
131
|
+
"is_benchmark_trace_enabled",
|
|
132
|
+
"is_regression",
|
|
133
|
+
"label_for",
|
|
134
|
+
"quick_config",
|
|
135
|
+
"read_baseline",
|
|
136
|
+
"record_benchmark_trace",
|
|
137
|
+
"reset_benchmark_metrics",
|
|
138
|
+
"reset_registry",
|
|
139
|
+
"run_all",
|
|
140
|
+
"set_benchmark_trace_enabled",
|
|
141
|
+
"summarize_regressions",
|
|
142
|
+
"write_baseline",
|
|
143
|
+
]
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"""``python -m asyncviz.benchmarks`` — run the registered suite.
|
|
2
|
+
|
|
3
|
+
Usage::
|
|
4
|
+
|
|
5
|
+
python -m asyncviz.benchmarks
|
|
6
|
+
python -m asyncviz.benchmarks --quick
|
|
7
|
+
python -m asyncviz.benchmarks --category replay
|
|
8
|
+
python -m asyncviz.benchmarks --name-prefix instrumentation.
|
|
9
|
+
python -m asyncviz.benchmarks --json /tmp/bench.json --markdown /tmp/bench.md
|
|
10
|
+
python -m asyncviz.benchmarks --baseline /tmp/baseline.json
|
|
11
|
+
python -m asyncviz.benchmarks --write-baseline /tmp/baseline.json
|
|
12
|
+
python -m asyncviz.benchmarks --track-allocations
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import argparse
|
|
18
|
+
import sys
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
|
|
21
|
+
# Importing the benchmark categories registers their entries.
|
|
22
|
+
import asyncviz.benchmarks.instrumentation
|
|
23
|
+
import asyncviz.benchmarks.memory
|
|
24
|
+
import asyncviz.benchmarks.replay
|
|
25
|
+
import asyncviz.benchmarks.stress
|
|
26
|
+
import asyncviz.benchmarks.websocket # noqa: F401
|
|
27
|
+
from asyncviz.benchmarks import (
|
|
28
|
+
BenchmarkConfig,
|
|
29
|
+
default_config,
|
|
30
|
+
quick_config,
|
|
31
|
+
read_baseline,
|
|
32
|
+
run_all,
|
|
33
|
+
set_benchmark_trace_enabled,
|
|
34
|
+
summarize_regressions,
|
|
35
|
+
write_baseline,
|
|
36
|
+
)
|
|
37
|
+
from asyncviz.benchmarks.reporting import (
|
|
38
|
+
emit_ci_summary,
|
|
39
|
+
write_json_report,
|
|
40
|
+
write_markdown_report,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _parse_args(argv: list[str] | None = None) -> argparse.Namespace:
|
|
45
|
+
parser = argparse.ArgumentParser(
|
|
46
|
+
prog="asyncviz.benchmarks",
|
|
47
|
+
description="Run AsyncViz benchmarks + emit reports.",
|
|
48
|
+
)
|
|
49
|
+
parser.add_argument(
|
|
50
|
+
"--quick",
|
|
51
|
+
action="store_true",
|
|
52
|
+
help="Use the quick benchmark config",
|
|
53
|
+
)
|
|
54
|
+
parser.add_argument("--category", default=None, help="Filter by category")
|
|
55
|
+
parser.add_argument(
|
|
56
|
+
"--name-prefix",
|
|
57
|
+
default=None,
|
|
58
|
+
help="Filter by name prefix",
|
|
59
|
+
)
|
|
60
|
+
parser.add_argument(
|
|
61
|
+
"--baseline",
|
|
62
|
+
type=Path,
|
|
63
|
+
default=None,
|
|
64
|
+
help="Compare against this baseline file",
|
|
65
|
+
)
|
|
66
|
+
parser.add_argument(
|
|
67
|
+
"--write-baseline",
|
|
68
|
+
type=Path,
|
|
69
|
+
default=None,
|
|
70
|
+
help="Write a new baseline after the run",
|
|
71
|
+
)
|
|
72
|
+
parser.add_argument(
|
|
73
|
+
"--json",
|
|
74
|
+
type=Path,
|
|
75
|
+
default=None,
|
|
76
|
+
help="Write full JSON report to this path",
|
|
77
|
+
)
|
|
78
|
+
parser.add_argument(
|
|
79
|
+
"--markdown",
|
|
80
|
+
type=Path,
|
|
81
|
+
default=None,
|
|
82
|
+
help="Write markdown summary to this path",
|
|
83
|
+
)
|
|
84
|
+
parser.add_argument(
|
|
85
|
+
"--trace",
|
|
86
|
+
action="store_true",
|
|
87
|
+
help="Enable benchmark tracing during the run",
|
|
88
|
+
)
|
|
89
|
+
parser.add_argument(
|
|
90
|
+
"--track-allocations",
|
|
91
|
+
action="store_true",
|
|
92
|
+
help="Capture per-sample tracemalloc deltas (slow)",
|
|
93
|
+
)
|
|
94
|
+
parser.add_argument(
|
|
95
|
+
"--fail-on-regression",
|
|
96
|
+
action="store_true",
|
|
97
|
+
help="Exit nonzero if any regression is detected vs baseline",
|
|
98
|
+
)
|
|
99
|
+
return parser.parse_args(argv)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def _resolve_config(args: argparse.Namespace) -> BenchmarkConfig:
|
|
103
|
+
base = quick_config() if args.quick else default_config()
|
|
104
|
+
return BenchmarkConfig(
|
|
105
|
+
warmup_iterations=base.warmup_iterations,
|
|
106
|
+
measured_iterations=base.measured_iterations,
|
|
107
|
+
min_samples=base.min_samples,
|
|
108
|
+
outlier_policy=base.outlier_policy,
|
|
109
|
+
mad_threshold=base.mad_threshold,
|
|
110
|
+
iqr_factor=base.iqr_factor,
|
|
111
|
+
regression_threshold=base.regression_threshold,
|
|
112
|
+
report_percentiles=base.report_percentiles,
|
|
113
|
+
disable_gc_during_run=base.disable_gc_during_run,
|
|
114
|
+
isolate_per_benchmark=base.isolate_per_benchmark,
|
|
115
|
+
track_allocations=args.track_allocations,
|
|
116
|
+
deterministic_seed=base.deterministic_seed,
|
|
117
|
+
fail_on_regression=args.fail_on_regression,
|
|
118
|
+
extras=dict(base.extras),
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def main(argv: list[str] | None = None) -> int:
|
|
123
|
+
args = _parse_args(argv)
|
|
124
|
+
if args.trace:
|
|
125
|
+
set_benchmark_trace_enabled(True)
|
|
126
|
+
|
|
127
|
+
config = _resolve_config(args)
|
|
128
|
+
baselines = None
|
|
129
|
+
if args.baseline is not None:
|
|
130
|
+
bf = read_baseline(args.baseline)
|
|
131
|
+
if bf is not None:
|
|
132
|
+
baselines = bf.p95_ns_by_name
|
|
133
|
+
|
|
134
|
+
suite = run_all(
|
|
135
|
+
config=config,
|
|
136
|
+
baselines=baselines,
|
|
137
|
+
name_prefix=args.name_prefix,
|
|
138
|
+
category=args.category, # type: ignore[arg-type]
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
for line in emit_ci_summary(suite):
|
|
142
|
+
print(line)
|
|
143
|
+
|
|
144
|
+
if args.json is not None:
|
|
145
|
+
write_json_report(args.json, suite)
|
|
146
|
+
print(f"json report → {args.json}")
|
|
147
|
+
if args.markdown is not None:
|
|
148
|
+
write_markdown_report(args.markdown, suite)
|
|
149
|
+
print(f"markdown report → {args.markdown}")
|
|
150
|
+
if args.write_baseline is not None:
|
|
151
|
+
write_baseline(args.write_baseline, suite)
|
|
152
|
+
print(f"baseline → {args.write_baseline}")
|
|
153
|
+
|
|
154
|
+
summary = summarize_regressions(suite)
|
|
155
|
+
if args.fail_on_regression and summary.regressed > 0:
|
|
156
|
+
return 1
|
|
157
|
+
return 0
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
if __name__ == "__main__":
|
|
161
|
+
sys.exit(main())
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""Baseline persistence + comparison.
|
|
2
|
+
|
|
3
|
+
A baseline is a JSON file mapping benchmark names → p95 ns. The
|
|
4
|
+
runner consumes this via :meth:`BenchmarkRunner.set_baselines`; the
|
|
5
|
+
CLI writes one out after a clean run so subsequent runs have
|
|
6
|
+
something to compare against.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import json
|
|
12
|
+
import time
|
|
13
|
+
from dataclasses import dataclass, field
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
from asyncviz.benchmarks.benchmark_models import BenchmarkSuiteResult
|
|
17
|
+
|
|
18
|
+
BASELINE_SCHEMA_VERSION = 1
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@dataclass(frozen=True, slots=True)
|
|
22
|
+
class BaselineFile:
|
|
23
|
+
"""Parsed view of a baseline JSON."""
|
|
24
|
+
|
|
25
|
+
schema_version: int
|
|
26
|
+
captured_at_wall_ns: int
|
|
27
|
+
asyncviz_version: str
|
|
28
|
+
p95_ns_by_name: dict[str, int]
|
|
29
|
+
metadata: dict[str, str] = field(default_factory=dict)
|
|
30
|
+
|
|
31
|
+
def get(self, name: str) -> int | None:
|
|
32
|
+
return self.p95_ns_by_name.get(name)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def write_baseline(
|
|
36
|
+
path: Path,
|
|
37
|
+
suite: BenchmarkSuiteResult,
|
|
38
|
+
*,
|
|
39
|
+
metadata: dict[str, str] | None = None,
|
|
40
|
+
) -> BaselineFile:
|
|
41
|
+
"""Build a baseline file from a suite result + persist it."""
|
|
42
|
+
p95_map = {
|
|
43
|
+
result.outcome.spec_name: result.outcome.statistics.p95_ns
|
|
44
|
+
for result in suite.results
|
|
45
|
+
if result.outcome.statistics is not None and result.outcome.status == "ok"
|
|
46
|
+
}
|
|
47
|
+
baseline = BaselineFile(
|
|
48
|
+
schema_version=BASELINE_SCHEMA_VERSION,
|
|
49
|
+
captured_at_wall_ns=time.time_ns(),
|
|
50
|
+
asyncviz_version=suite.environment.asyncviz_version,
|
|
51
|
+
p95_ns_by_name=p95_map,
|
|
52
|
+
metadata=dict(metadata or {}),
|
|
53
|
+
)
|
|
54
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
55
|
+
payload = {
|
|
56
|
+
"schema_version": baseline.schema_version,
|
|
57
|
+
"captured_at_wall_ns": baseline.captured_at_wall_ns,
|
|
58
|
+
"asyncviz_version": baseline.asyncviz_version,
|
|
59
|
+
"p95_ns_by_name": baseline.p95_ns_by_name,
|
|
60
|
+
"metadata": baseline.metadata,
|
|
61
|
+
}
|
|
62
|
+
path.write_text(json.dumps(payload, indent=2, sort_keys=True), encoding="utf-8")
|
|
63
|
+
return baseline
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def read_baseline(path: Path) -> BaselineFile | None:
|
|
67
|
+
"""Read a baseline file. Returns ``None`` if missing."""
|
|
68
|
+
if not path.exists():
|
|
69
|
+
return None
|
|
70
|
+
raw = json.loads(path.read_text(encoding="utf-8"))
|
|
71
|
+
schema = int(raw.get("schema_version", 0))
|
|
72
|
+
if schema != BASELINE_SCHEMA_VERSION:
|
|
73
|
+
raise ValueError(
|
|
74
|
+
f"baseline at {path} has schema_version={schema} (expected {BASELINE_SCHEMA_VERSION})",
|
|
75
|
+
)
|
|
76
|
+
return BaselineFile(
|
|
77
|
+
schema_version=schema,
|
|
78
|
+
captured_at_wall_ns=int(raw.get("captured_at_wall_ns", 0)),
|
|
79
|
+
asyncviz_version=str(raw.get("asyncviz_version", "")),
|
|
80
|
+
p95_ns_by_name={str(k): int(v) for k, v in raw.get("p95_ns_by_name", {}).items()},
|
|
81
|
+
metadata={str(k): str(v) for k, v in raw.get("metadata", {}).items()},
|
|
82
|
+
)
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"""Benchmark configuration.
|
|
2
|
+
|
|
3
|
+
Centralizes every knob the runner cares about: warmup discipline,
|
|
4
|
+
sample counts, statistical rigor (outlier policy, minimum-sample
|
|
5
|
+
floor), default regression thresholds. Tests construct purpose-built
|
|
6
|
+
configs; the production CLI uses :func:`default_config`.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from dataclasses import dataclass, field
|
|
12
|
+
from typing import Final, Literal
|
|
13
|
+
|
|
14
|
+
OutlierPolicy = Literal["none", "mad", "iqr"]
|
|
15
|
+
"""How outliers are excluded from the reported statistics.
|
|
16
|
+
|
|
17
|
+
* ``none`` — keep every sample.
|
|
18
|
+
* ``mad`` (default) — drop samples beyond a configured number of
|
|
19
|
+
median-absolute-deviations from the median. Stable under skewed
|
|
20
|
+
distributions where mean/stdev would mislead.
|
|
21
|
+
* ``iqr`` — Tukey's IQR fence.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
DEFAULT_WARMUP_ITERATIONS: Final[int] = 50
|
|
25
|
+
DEFAULT_MEASURED_ITERATIONS: Final[int] = 500
|
|
26
|
+
DEFAULT_MIN_SAMPLES: Final[int] = 25
|
|
27
|
+
"""Hard floor — a benchmark with fewer surviving samples than this
|
|
28
|
+
is flagged as ``insufficient`` rather than reported with bogus
|
|
29
|
+
statistics."""
|
|
30
|
+
|
|
31
|
+
DEFAULT_REGRESSION_THRESHOLD: Final[float] = 0.15
|
|
32
|
+
"""Default ±15% p95 swing before a regression is declared."""
|
|
33
|
+
|
|
34
|
+
DEFAULT_REPORT_PERCENTILES: Final[tuple[float, ...]] = (50.0, 95.0, 99.0)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@dataclass(frozen=True, slots=True)
|
|
38
|
+
class BenchmarkConfig:
|
|
39
|
+
"""Immutable benchmark-runner configuration."""
|
|
40
|
+
|
|
41
|
+
warmup_iterations: int = DEFAULT_WARMUP_ITERATIONS
|
|
42
|
+
measured_iterations: int = DEFAULT_MEASURED_ITERATIONS
|
|
43
|
+
min_samples: int = DEFAULT_MIN_SAMPLES
|
|
44
|
+
|
|
45
|
+
outlier_policy: OutlierPolicy = "mad"
|
|
46
|
+
mad_threshold: float = 3.5
|
|
47
|
+
"""Number of MADs from the median to keep a sample."""
|
|
48
|
+
|
|
49
|
+
iqr_factor: float = 1.5
|
|
50
|
+
|
|
51
|
+
regression_threshold: float = DEFAULT_REGRESSION_THRESHOLD
|
|
52
|
+
|
|
53
|
+
report_percentiles: tuple[float, ...] = DEFAULT_REPORT_PERCENTILES
|
|
54
|
+
|
|
55
|
+
disable_gc_during_run: bool = True
|
|
56
|
+
"""Disable Python's cyclic GC while measuring so allocation
|
|
57
|
+
spikes from cycle collection don't pollute timing samples."""
|
|
58
|
+
|
|
59
|
+
isolate_per_benchmark: bool = True
|
|
60
|
+
"""Force a full GC + counter reset between benchmarks so one
|
|
61
|
+
workload's tail allocations don't affect the next."""
|
|
62
|
+
|
|
63
|
+
track_allocations: bool = False
|
|
64
|
+
"""When True, every sample also captures
|
|
65
|
+
:func:`tracemalloc.take_snapshot` deltas — slows the run."""
|
|
66
|
+
|
|
67
|
+
deterministic_seed: int = 0xA5_BE_F7
|
|
68
|
+
"""Seed used for the synthetic workloads' random number streams."""
|
|
69
|
+
|
|
70
|
+
fail_on_regression: bool = False
|
|
71
|
+
"""When True, the suite returns a nonzero exit code on regression.
|
|
72
|
+
Off by default — informative, not enforcing — until baselines
|
|
73
|
+
are established."""
|
|
74
|
+
|
|
75
|
+
extras: dict[str, str] = field(default_factory=dict)
|
|
76
|
+
"""Free-form notes for downstream tooling."""
|
|
77
|
+
|
|
78
|
+
def __post_init__(self) -> None:
|
|
79
|
+
if self.warmup_iterations < 0:
|
|
80
|
+
raise ValueError("warmup_iterations must be >= 0")
|
|
81
|
+
if self.measured_iterations < 1:
|
|
82
|
+
raise ValueError("measured_iterations must be >= 1")
|
|
83
|
+
if self.min_samples < 1:
|
|
84
|
+
raise ValueError("min_samples must be >= 1")
|
|
85
|
+
if not (0.0 < self.regression_threshold < 10.0):
|
|
86
|
+
raise ValueError(
|
|
87
|
+
f"regression_threshold {self.regression_threshold} must be in (0, 10)",
|
|
88
|
+
)
|
|
89
|
+
if self.outlier_policy == "mad" and self.mad_threshold <= 0:
|
|
90
|
+
raise ValueError("mad_threshold must be > 0")
|
|
91
|
+
if self.outlier_policy == "iqr" and self.iqr_factor <= 0:
|
|
92
|
+
raise ValueError("iqr_factor must be > 0")
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def default_config() -> BenchmarkConfig:
|
|
96
|
+
return BenchmarkConfig()
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def quick_config() -> BenchmarkConfig:
|
|
100
|
+
"""Faster config for smoke tests + CI sanity runs."""
|
|
101
|
+
return BenchmarkConfig(
|
|
102
|
+
warmup_iterations=10,
|
|
103
|
+
measured_iterations=50,
|
|
104
|
+
min_samples=10,
|
|
105
|
+
)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""Diagnostics builder for the benchmark layer."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
|
|
7
|
+
from asyncviz.benchmarks.benchmark_models import BenchmarkSuiteResult
|
|
8
|
+
from asyncviz.benchmarks.benchmark_observability import (
|
|
9
|
+
BenchmarkMetricsSnapshot,
|
|
10
|
+
get_benchmark_metrics_snapshot,
|
|
11
|
+
)
|
|
12
|
+
from asyncviz.benchmarks.benchmark_thresholds import (
|
|
13
|
+
RegressionSummary,
|
|
14
|
+
summarize_regressions,
|
|
15
|
+
)
|
|
16
|
+
from asyncviz.benchmarks.benchmark_tracing import (
|
|
17
|
+
BenchmarkTraceEntry,
|
|
18
|
+
get_benchmark_trace,
|
|
19
|
+
is_benchmark_trace_enabled,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@dataclass(frozen=True, slots=True)
|
|
24
|
+
class BenchmarkDiagnostics:
|
|
25
|
+
metrics: BenchmarkMetricsSnapshot
|
|
26
|
+
regression: RegressionSummary | None
|
|
27
|
+
trace_enabled: bool
|
|
28
|
+
recent_trace: tuple[BenchmarkTraceEntry, ...]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def build_benchmark_diagnostics(
|
|
32
|
+
suite: BenchmarkSuiteResult | None = None,
|
|
33
|
+
*,
|
|
34
|
+
trace_limit: int = 32,
|
|
35
|
+
) -> BenchmarkDiagnostics:
|
|
36
|
+
trace = get_benchmark_trace()
|
|
37
|
+
if trace_limit > 0:
|
|
38
|
+
trace = trace[-trace_limit:]
|
|
39
|
+
return BenchmarkDiagnostics(
|
|
40
|
+
metrics=get_benchmark_metrics_snapshot(),
|
|
41
|
+
regression=summarize_regressions(suite) if suite is not None else None,
|
|
42
|
+
trace_enabled=is_benchmark_trace_enabled(),
|
|
43
|
+
recent_trace=trace,
|
|
44
|
+
)
|