execweave 1.0.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.
- execweave/__init__.py +3 -0
- execweave/__main__.py +5 -0
- execweave/_conversation_records_core.py +902 -0
- execweave/_dashboard_shell_base.py +148 -0
- execweave/_http_proxy_base.py +565 -0
- execweave/_http_proxy_bounded.py +560 -0
- execweave/_http_proxy_stage.py +509 -0
- execweave/acceptance_output.py +19 -0
- execweave/agent_bootstrap.py +395 -0
- execweave/agent_topology.py +313 -0
- execweave/agent_trace.py +1162 -0
- execweave/agy_preview_sanitize.py +102 -0
- execweave/analysis.py +427 -0
- execweave/anthropic.py +228 -0
- execweave/anthropic_cli.py +171 -0
- execweave/anthropic_full_fidelity.py +385 -0
- execweave/antigravity_adapter.py +112 -0
- execweave/antigravity_adapter_base.py +479 -0
- execweave/antigravity_full_fidelity.py +656 -0
- execweave/antigravity_full_fidelity_base.py +172 -0
- execweave/antigravity_full_fidelity_collaboration_base.py +451 -0
- execweave/antigravity_hook_cli.py +209 -0
- execweave/antigravity_record.py +96 -0
- execweave/antigravity_subagent_linkage.py +449 -0
- execweave/antigravity_trace_capability.py +39 -0
- execweave/auto_specialized.py +547 -0
- execweave/backends.py +102 -0
- execweave/benchmark.py +80 -0
- execweave/claude_adapter.py +517 -0
- execweave/claude_child_transcript.py +314 -0
- execweave/claude_delegation.py +136 -0
- execweave/claude_full_fidelity.py +396 -0
- execweave/claude_hook_cli.py +209 -0
- execweave/claude_hook_contract.py +943 -0
- execweave/claude_model_observer.py +353 -0
- execweave/claude_record.py +106 -0
- execweave/cli.py +629 -0
- execweave/codex_adapter.py +455 -0
- execweave/codex_conversation.py +621 -0
- execweave/codex_full_fidelity.py +287 -0
- execweave/codex_hook_cli.py +301 -0
- execweave/codex_hook_entry.py +207 -0
- execweave/codex_hook_lifecycle.py +363 -0
- execweave/codex_message_diagnostics.py +322 -0
- execweave/codex_message_transport_diagnostics.py +399 -0
- execweave/codex_record.py +199 -0
- execweave/codex_rollout_structures.py +402 -0
- execweave/codex_rollout_trace.py +56 -0
- execweave/codex_rollout_trace_base.py +1509 -0
- execweave/collector.py +768 -0
- execweave/command.py +157 -0
- execweave/command_privacy.py +20 -0
- execweave/content_evidence.py +101 -0
- execweave/content_integrity.py +289 -0
- execweave/content_store.py +273 -0
- execweave/controlled_checks.py +561 -0
- execweave/conversation_archive.py +338 -0
- execweave/conversation_message_identity.py +264 -0
- execweave/conversation_preview.py +66 -0
- execweave/conversation_preview_antigravity.py +32 -0
- execweave/conversation_preview_claude.py +31 -0
- execweave/conversation_preview_codex.py +107 -0
- execweave/conversation_preview_common.py +180 -0
- execweave/conversation_preview_generic.py +188 -0
- execweave/conversation_preview_lines.py +133 -0
- execweave/conversation_preview_transcript.py +121 -0
- execweave/conversation_records.py +349 -0
- execweave/conversation_records_antigravity.py +370 -0
- execweave/conversation_records_codex.py +83 -0
- execweave/conversation_records_common.py +17 -0
- execweave/conversation_records_ollama.py +39 -0
- execweave/correlation.py +818 -0
- execweave/cursor_adapter.py +349 -0
- execweave/cursor_delegation.py +87 -0
- execweave/cursor_delegation_base.py +220 -0
- execweave/cursor_full_fidelity.py +489 -0
- execweave/cursor_hook_cli.py +195 -0
- execweave/cursor_hook_contract.py +439 -0
- execweave/cursor_lifecycle.py +159 -0
- execweave/cursor_record.py +96 -0
- execweave/dashboard_shell.py +283 -0
- execweave/delivery_status.py +94 -0
- execweave/entry.py +98 -0
- execweave/evidence_availability.py +113 -0
- execweave/evidence_grade.py +166 -0
- execweave/fidelity.py +304 -0
- execweave/filesystem.py +327 -0
- execweave/finalization.py +92 -0
- execweave/focus.py +118 -0
- execweave/framework_adapters/__init__.py +34 -0
- execweave/framework_adapters/autogen.py +398 -0
- execweave/framework_adapters/base.py +580 -0
- execweave/framework_adapters/camel.py +270 -0
- execweave/framework_adapters/camel_channel.py +71 -0
- execweave/framework_adapters/metagpt.py +315 -0
- execweave/framework_adapters/metagpt_ollama_compat.py +54 -0
- execweave/framework_adapters/metagpt_recording.py +342 -0
- execweave/framework_adapters/registry.py +90 -0
- execweave/graph.py +590 -0
- execweave/graph_ops.py +472 -0
- execweave/hook_command.py +32 -0
- execweave/hook_delivery.py +32 -0
- execweave/hook_input.py +16 -0
- execweave/http_proxy.py +187 -0
- execweave/http_proxy_cli.py +84 -0
- execweave/inference_gateway.py +476 -0
- execweave/inference_gateway_cli.py +211 -0
- execweave/inference_gateway_full_fidelity.py +613 -0
- execweave/inference_identity.py +76 -0
- execweave/inference_identity_cli.py +60 -0
- execweave/integrity.py +235 -0
- execweave/integrity_cli.py +55 -0
- execweave/investigation_index.py +445 -0
- execweave/litellm_callback.py +211 -0
- execweave/litellm_callback_cli.py +42 -0
- execweave/live.py +445 -0
- execweave/live_core.py +972 -0
- execweave/live_view.py +109 -0
- execweave/live_view_extra_style.py +11 -0
- execweave/live_view_markup.py +29 -0
- execweave/live_view_process_layout.py +650 -0
- execweave/live_view_readability.py +502 -0
- execweave/live_view_script_a.py +59 -0
- execweave/live_view_script_b.py +97 -0
- execweave/live_view_script_c.py +59 -0
- execweave/live_view_script_d.py +40 -0
- execweave/live_view_style.py +34 -0
- execweave/model_runtime.py +560 -0
- execweave/model_runtime_cli.py +265 -0
- execweave/model_runtime_full_fidelity.py +519 -0
- execweave/observation.py +53 -0
- execweave/observation_demo.py +69 -0
- execweave/openai_agents.py +267 -0
- execweave/openai_agents_sdk.py +453 -0
- execweave/openai_compatible.py +239 -0
- execweave/openai_compatible_cli.py +189 -0
- execweave/openai_compatible_full_fidelity.py +438 -0
- execweave/opencode_adapter.py +325 -0
- execweave/opencode_event_contract.py +734 -0
- execweave/opencode_full_fidelity.py +198 -0
- execweave/opencode_hook_cli.py +119 -0
- execweave/opencode_plugin_cli.py +150 -0
- execweave/opencode_record.py +96 -0
- execweave/opencode_task_linkage.py +225 -0
- execweave/overhead_benchmark.py +440 -0
- execweave/privacy.py +84 -0
- execweave/private_io.py +465 -0
- execweave/provider_capability.py +578 -0
- execweave/provider_lifecycle.py +282 -0
- execweave/provider_record.py +290 -0
- execweave/reader_identity.py +13 -0
- execweave/redacted_archive.py +906 -0
- execweave/risk.py +106 -0
- execweave/rule_pack.py +359 -0
- execweave/rule_pack_cli.py +57 -0
- execweave/run_assessment.py +200 -0
- execweave/runtime_endpoint_availability.py +44 -0
- execweave/scalability_benchmark.py +195 -0
- execweave/schema.py +62 -0
- execweave/scope.py +85 -0
- execweave/semantic.py +453 -0
- execweave/session_summary.py +159 -0
- execweave/sink.py +71 -0
- execweave/strace_backend.py +927 -0
- execweave/stream_assembly.py +363 -0
- execweave/task_artifacts.py +192 -0
- execweave/task_validation.py +317 -0
- execweave/theme.py +40 -0
- execweave/top.py +599 -0
- execweave/top_cli.py +150 -0
- execweave/validate.py +196 -0
- execweave/vendor/dagre.min.js +815 -0
- execweave/view_cli.py +49 -0
- execweave/viewer.py +474 -0
- execweave/viewer_agent_panel.py +630 -0
- execweave/viewer_agent_panel_antigravity.py +31 -0
- execweave/viewer_agent_panel_claude.py +9 -0
- execweave/viewer_agent_panel_codex.py +50 -0
- execweave/viewer_agent_panel_cursor.py +9 -0
- execweave/viewer_agent_panel_default.py +79 -0
- execweave/viewer_agent_panel_ollama.py +20 -0
- execweave/viewer_agent_panel_opencode.py +9 -0
- execweave/viewer_agent_panel_registry.py +20 -0
- execweave/viewer_archive_verifier.py +178 -0
- execweave/viewer_background_files.py +86 -0
- execweave/viewer_content_browser.py +307 -0
- execweave/viewer_content_health.py +208 -0
- execweave/viewer_content_inspector.py +309 -0
- execweave/viewer_controlled_checks.py +258 -0
- execweave/viewer_conversation_sync.py +115 -0
- execweave/viewer_dashboard_clean.py +405 -0
- execweave/viewer_dashboard_focus.py +127 -0
- execweave/viewer_dashboard_hardening.py +264 -0
- execweave/viewer_dashboard_hardening_v2.py +62 -0
- execweave/viewer_dashboard_projection.py +261 -0
- execweave/viewer_delivery_status.py +155 -0
- execweave/viewer_edge_decross.py +117 -0
- execweave/viewer_execution_flow.py +611 -0
- execweave/viewer_execution_flow_provider_normalization.py +107 -0
- execweave/viewer_execution_flow_safety.py +349 -0
- execweave/viewer_external_endpoints.py +307 -0
- execweave/viewer_flow_canvas.py +1140 -0
- execweave/viewer_flow_layout.py +922 -0
- execweave/viewer_fold_state.py +31 -0
- execweave/viewer_framework_flow.py +68 -0
- execweave/viewer_framework_model_output.py +133 -0
- execweave/viewer_gif.py +278 -0
- execweave/viewer_history_browser.py +225 -0
- execweave/viewer_investigation.py +268 -0
- execweave/viewer_layout_geometry.py +192 -0
- execweave/viewer_layout_v2.py +429 -0
- execweave/viewer_layout_v2_detached.py +25 -0
- execweave/viewer_limits.py +93 -0
- execweave/viewer_live_layout.py +61 -0
- execweave/viewer_message_handoffs.py +114 -0
- execweave/viewer_projection.py +488 -0
- execweave/viewer_projection_base.py +522 -0
- execweave/viewer_projection_bridges.py +214 -0
- execweave/viewer_recorded_sources.py +146 -0
- execweave/viewer_run_assessment.py +274 -0
- execweave/viewer_run_guide.py +175 -0
- execweave/viewer_runtime_evidence.py +258 -0
- execweave/viewer_semantic_projection.py +641 -0
- execweave/viewer_session_flow.py +491 -0
- execweave/viewer_structure_share.py +132 -0
- execweave/viewer_task_validation.py +241 -0
- execweave/viewer_tool_mirror_identity.py +75 -0
- execweave/viewer_workflow_mode.py +127 -0
- execweave/workflow.py +183 -0
- execweave-1.0.0.dist-info/METADATA +462 -0
- execweave-1.0.0.dist-info/RECORD +234 -0
- execweave-1.0.0.dist-info/WHEEL +4 -0
- execweave-1.0.0.dist-info/entry_points.txt +30 -0
- execweave-1.0.0.dist-info/licenses/LICENSE +16 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from .content_evidence import content_observation_event
|
|
6
|
+
from .content_store import FullFidelityContentStore
|
|
7
|
+
from .agent_topology import EVIDENCE_PARENT_SESSION_ID, root_topology, subagent_topology
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _string(value: object) -> str | None:
|
|
11
|
+
return value if isinstance(value, str) and value else None
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _event_body(payload: dict[str, Any]) -> tuple[str, dict[str, Any]] | None:
|
|
15
|
+
if payload.get("hook_event_name") != "event":
|
|
16
|
+
return None
|
|
17
|
+
raw = payload.get("event")
|
|
18
|
+
if not isinstance(raw, dict) or raw.get("type") != "message.part.updated":
|
|
19
|
+
return None
|
|
20
|
+
properties = raw.get("properties")
|
|
21
|
+
if not isinstance(properties, dict):
|
|
22
|
+
return None
|
|
23
|
+
return "message.part.updated", properties
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _agent(
|
|
27
|
+
session_id: str,
|
|
28
|
+
*,
|
|
29
|
+
agent_name: str | None = None,
|
|
30
|
+
parent_session_id: str | None = None,
|
|
31
|
+
) -> dict[str, Any]:
|
|
32
|
+
"""Build an OpenCode session agent node.
|
|
33
|
+
|
|
34
|
+
A session is only a child when the task tool's own metadata names its
|
|
35
|
+
``parentSessionId``. Without that, a session id is just a session id and the
|
|
36
|
+
agent stays root.
|
|
37
|
+
"""
|
|
38
|
+
attributes: dict[str, Any] = {
|
|
39
|
+
"provider": "opencode",
|
|
40
|
+
"session_id": session_id,
|
|
41
|
+
"identity_semantics": "provider_session_id",
|
|
42
|
+
}
|
|
43
|
+
if parent_session_id:
|
|
44
|
+
attributes.update(
|
|
45
|
+
subagent_topology(
|
|
46
|
+
evidence=EVIDENCE_PARENT_SESSION_ID,
|
|
47
|
+
parent_scope_id=parent_session_id,
|
|
48
|
+
)
|
|
49
|
+
)
|
|
50
|
+
else:
|
|
51
|
+
attributes.update(root_topology())
|
|
52
|
+
if agent_name:
|
|
53
|
+
attributes["native_agent_name"] = agent_name
|
|
54
|
+
return {
|
|
55
|
+
"type": "agent",
|
|
56
|
+
"id": f"agent:opencode:session:{session_id}",
|
|
57
|
+
"name": agent_name or "OpenCode session",
|
|
58
|
+
"attributes": attributes,
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _tool_call(session_id: str, call_id: str) -> dict[str, Any]:
|
|
63
|
+
return {
|
|
64
|
+
"type": "tool_call",
|
|
65
|
+
"id": f"tool-call:opencode:{session_id}:{call_id}",
|
|
66
|
+
"name": "task",
|
|
67
|
+
"attributes": {
|
|
68
|
+
"provider": "opencode",
|
|
69
|
+
"session_id": session_id,
|
|
70
|
+
"call_id": call_id,
|
|
71
|
+
"tool_name": "task",
|
|
72
|
+
"identity_semantics": "provider_call_id",
|
|
73
|
+
},
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _task_content_event(
|
|
78
|
+
*,
|
|
79
|
+
child: dict[str, Any],
|
|
80
|
+
value: str,
|
|
81
|
+
content_kind: str,
|
|
82
|
+
relation: str,
|
|
83
|
+
observed_field: str,
|
|
84
|
+
store: FullFidelityContentStore,
|
|
85
|
+
timestamp: str,
|
|
86
|
+
attributes: dict[str, Any],
|
|
87
|
+
) -> dict[str, Any]:
|
|
88
|
+
reference = store.put_text(value, content_kind=content_kind)
|
|
89
|
+
return content_observation_event(
|
|
90
|
+
timestamp=timestamp,
|
|
91
|
+
provider="opencode",
|
|
92
|
+
source=child,
|
|
93
|
+
reference=reference,
|
|
94
|
+
relation=relation,
|
|
95
|
+
observed_field=observed_field,
|
|
96
|
+
evidence_source="provider_plugin",
|
|
97
|
+
attribution="opencode_task_tool_metadata",
|
|
98
|
+
event_type="semantic.opencode.task_session.content",
|
|
99
|
+
attributes={
|
|
100
|
+
**attributes,
|
|
101
|
+
"conversation_projection_basis": "exact_task_tool_child_session_metadata",
|
|
102
|
+
},
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def opencode_task_session_events(
|
|
107
|
+
payload: dict[str, Any],
|
|
108
|
+
*,
|
|
109
|
+
timestamp: str,
|
|
110
|
+
store: FullFidelityContentStore | None = None,
|
|
111
|
+
) -> list[dict[str, Any]]:
|
|
112
|
+
"""Project exact OpenCode Task metadata into child-session assignment evidence.
|
|
113
|
+
|
|
114
|
+
When a content store is supplied, the same provider-exposed task prompt and
|
|
115
|
+
description are also attached to the exact child session so the dashboard can
|
|
116
|
+
render the delegated task inside that child agent's conversation thread.
|
|
117
|
+
"""
|
|
118
|
+
parsed = _event_body(payload)
|
|
119
|
+
if parsed is None:
|
|
120
|
+
return []
|
|
121
|
+
event_type, body = parsed
|
|
122
|
+
part = body.get("part")
|
|
123
|
+
if not isinstance(part, dict) or part.get("type") != "tool":
|
|
124
|
+
return []
|
|
125
|
+
if _string(part.get("tool")) != "task":
|
|
126
|
+
return []
|
|
127
|
+
|
|
128
|
+
current_session = (
|
|
129
|
+
_string(part.get("sessionID"))
|
|
130
|
+
or _string(part.get("sessionId"))
|
|
131
|
+
or _string(payload.get("sessionID"))
|
|
132
|
+
)
|
|
133
|
+
call_id = _string(part.get("callID")) or _string(part.get("callId"))
|
|
134
|
+
state = part.get("state")
|
|
135
|
+
if current_session is None or call_id is None or not isinstance(state, dict):
|
|
136
|
+
return []
|
|
137
|
+
|
|
138
|
+
metadata = state.get("metadata")
|
|
139
|
+
if not isinstance(metadata, dict):
|
|
140
|
+
return []
|
|
141
|
+
parent_session = _string(metadata.get("parentSessionId"))
|
|
142
|
+
child_session = _string(metadata.get("sessionId"))
|
|
143
|
+
if (
|
|
144
|
+
parent_session is None
|
|
145
|
+
or child_session is None
|
|
146
|
+
or parent_session != current_session
|
|
147
|
+
):
|
|
148
|
+
return []
|
|
149
|
+
|
|
150
|
+
state_input = state.get("input")
|
|
151
|
+
if not isinstance(state_input, dict):
|
|
152
|
+
state_input = {}
|
|
153
|
+
agent_name = _string(state_input.get("subagent_type"))
|
|
154
|
+
task_id = _string(state_input.get("task_id"))
|
|
155
|
+
background = state_input.get("background")
|
|
156
|
+
|
|
157
|
+
attributes: dict[str, Any] = {
|
|
158
|
+
"backend": "semantic",
|
|
159
|
+
"provider": "opencode",
|
|
160
|
+
"evidence_source": "provider_plugin",
|
|
161
|
+
"attribution": "opencode_task_tool_metadata",
|
|
162
|
+
"causal": False,
|
|
163
|
+
"inferred": False,
|
|
164
|
+
"opencode_event_type": event_type,
|
|
165
|
+
"provider_task_session_id_exact": True,
|
|
166
|
+
"provider_parent_session_id_exact": True,
|
|
167
|
+
"assignment_basis": "task_tool_state.metadata.sessionId",
|
|
168
|
+
"task_session_mode": "resume_requested" if task_id else "new_requested",
|
|
169
|
+
}
|
|
170
|
+
if task_id:
|
|
171
|
+
attributes["requested_task_id"] = task_id
|
|
172
|
+
if isinstance(background, bool):
|
|
173
|
+
attributes["background_requested"] = background
|
|
174
|
+
|
|
175
|
+
# GraphEdge deliberately persists identity_exact / identity_method while the
|
|
176
|
+
# provider-specific booleans above remain event-level evidence. Scope those
|
|
177
|
+
# generic identity claims to the task -> child assignment itself; task content
|
|
178
|
+
# edges should not inherit an unrelated identity method.
|
|
179
|
+
assignment_attributes = {
|
|
180
|
+
**attributes,
|
|
181
|
+
"identity_exact": True,
|
|
182
|
+
"identity_method": "opencode_task_tool_parent_and_child_session_ids",
|
|
183
|
+
}
|
|
184
|
+
child = _agent(child_session, agent_name=agent_name, parent_session_id=parent_session)
|
|
185
|
+
events: list[dict[str, Any]] = [
|
|
186
|
+
{
|
|
187
|
+
"timestamp": timestamp,
|
|
188
|
+
"event_type": "semantic.opencode.task_session.assigned",
|
|
189
|
+
"relation": "ASSIGNED_AGENT_TASK",
|
|
190
|
+
"source": _tool_call(current_session, call_id),
|
|
191
|
+
"target": child,
|
|
192
|
+
"attributes": assignment_attributes,
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
|
|
196
|
+
if store is not None:
|
|
197
|
+
prompt = state_input.get("prompt")
|
|
198
|
+
if isinstance(prompt, str) and prompt:
|
|
199
|
+
events.append(
|
|
200
|
+
_task_content_event(
|
|
201
|
+
child=child,
|
|
202
|
+
value=prompt,
|
|
203
|
+
content_kind="opencode.subtask_prompt",
|
|
204
|
+
relation="OBSERVED_SUBAGENT_TASK",
|
|
205
|
+
observed_field="event.properties.part.state.input.prompt",
|
|
206
|
+
store=store,
|
|
207
|
+
timestamp=timestamp,
|
|
208
|
+
attributes=attributes,
|
|
209
|
+
)
|
|
210
|
+
)
|
|
211
|
+
description = state_input.get("description")
|
|
212
|
+
if isinstance(description, str) and description:
|
|
213
|
+
events.append(
|
|
214
|
+
_task_content_event(
|
|
215
|
+
child=child,
|
|
216
|
+
value=description,
|
|
217
|
+
content_kind="opencode.subtask_description",
|
|
218
|
+
relation="OBSERVED_SUBAGENT_DESCRIPTION",
|
|
219
|
+
observed_field="event.properties.part.state.input.description",
|
|
220
|
+
store=store,
|
|
221
|
+
timestamp=timestamp,
|
|
222
|
+
attributes=attributes,
|
|
223
|
+
)
|
|
224
|
+
)
|
|
225
|
+
return events
|
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import html
|
|
5
|
+
import importlib.metadata
|
|
6
|
+
import json
|
|
7
|
+
import math
|
|
8
|
+
import platform
|
|
9
|
+
import shutil
|
|
10
|
+
import statistics
|
|
11
|
+
import subprocess
|
|
12
|
+
import sys
|
|
13
|
+
import tempfile
|
|
14
|
+
import time
|
|
15
|
+
from datetime import datetime, timezone
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
from typing import Any
|
|
18
|
+
|
|
19
|
+
import psutil
|
|
20
|
+
|
|
21
|
+
from . import __version__
|
|
22
|
+
|
|
23
|
+
_SAMPLE_INTERVAL_SECONDS = 0.005
|
|
24
|
+
_WORKLOAD_ID = "agent_like_files_and_subprocesses_v1"
|
|
25
|
+
_WORKLOAD_CODE = """
|
|
26
|
+
from pathlib import Path
|
|
27
|
+
import hashlib
|
|
28
|
+
import subprocess
|
|
29
|
+
import sys
|
|
30
|
+
|
|
31
|
+
root = Path("payload")
|
|
32
|
+
root.mkdir(exist_ok=True)
|
|
33
|
+
payload = (b"execweave-reference-workload-" * 2048)[:32768]
|
|
34
|
+
for index in range(256):
|
|
35
|
+
path = root / f"file-{index % 16}.bin"
|
|
36
|
+
path.write_bytes(payload)
|
|
37
|
+
hashlib.sha256(path.read_bytes()).digest()
|
|
38
|
+
for path in root.iterdir():
|
|
39
|
+
path.unlink()
|
|
40
|
+
root.rmdir()
|
|
41
|
+
for _ in range(6):
|
|
42
|
+
subprocess.run(
|
|
43
|
+
[sys.executable, "-c", "sum(i*i for i in range(20000))"],
|
|
44
|
+
check=True,
|
|
45
|
+
stdout=subprocess.DEVNULL,
|
|
46
|
+
stderr=subprocess.DEVNULL,
|
|
47
|
+
)
|
|
48
|
+
""".strip()
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _workload_command() -> list[str]:
|
|
52
|
+
return [sys.executable, "-c", _WORKLOAD_CODE]
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _tree_rss_bytes(pid: int) -> int:
|
|
56
|
+
try:
|
|
57
|
+
root = psutil.Process(pid)
|
|
58
|
+
except (psutil.NoSuchProcess, psutil.AccessDenied):
|
|
59
|
+
return 0
|
|
60
|
+
processes = [root]
|
|
61
|
+
try:
|
|
62
|
+
processes.extend(root.children(recursive=True))
|
|
63
|
+
except (psutil.NoSuchProcess, psutil.AccessDenied):
|
|
64
|
+
pass
|
|
65
|
+
rss = 0
|
|
66
|
+
for process in processes:
|
|
67
|
+
try:
|
|
68
|
+
rss += process.memory_info().rss
|
|
69
|
+
except (psutil.NoSuchProcess, psutil.AccessDenied):
|
|
70
|
+
continue
|
|
71
|
+
return rss
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def _directory_size_bytes(path: Path) -> int:
|
|
75
|
+
total = 0
|
|
76
|
+
if not path.exists():
|
|
77
|
+
return 0
|
|
78
|
+
for candidate in path.rglob("*"):
|
|
79
|
+
try:
|
|
80
|
+
if candidate.is_file():
|
|
81
|
+
total += candidate.stat().st_size
|
|
82
|
+
except OSError:
|
|
83
|
+
continue
|
|
84
|
+
return total
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def _measure_command(command: list[str], *, cwd: Path) -> dict[str, float | int]:
|
|
88
|
+
start = time.perf_counter()
|
|
89
|
+
process = subprocess.Popen(
|
|
90
|
+
command,
|
|
91
|
+
cwd=cwd,
|
|
92
|
+
stdout=subprocess.DEVNULL,
|
|
93
|
+
stderr=subprocess.DEVNULL,
|
|
94
|
+
)
|
|
95
|
+
peak_rss = 0
|
|
96
|
+
while True:
|
|
97
|
+
peak_rss = max(peak_rss, _tree_rss_bytes(process.pid))
|
|
98
|
+
return_code = process.poll()
|
|
99
|
+
if return_code is not None:
|
|
100
|
+
break
|
|
101
|
+
time.sleep(_SAMPLE_INTERVAL_SECONDS)
|
|
102
|
+
elapsed = time.perf_counter() - start
|
|
103
|
+
if return_code != 0:
|
|
104
|
+
raise RuntimeError(f"benchmark command failed with exit code {return_code}")
|
|
105
|
+
return {
|
|
106
|
+
"wall_seconds": elapsed,
|
|
107
|
+
"peak_tree_rss_bytes": peak_rss,
|
|
108
|
+
"artifact_bytes": _directory_size_bytes(cwd),
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def _instrumented_command(backend: str, *, cwd: Path, output: Path) -> list[str]:
|
|
113
|
+
return [
|
|
114
|
+
sys.executable,
|
|
115
|
+
"-m",
|
|
116
|
+
"execweave",
|
|
117
|
+
"run",
|
|
118
|
+
"--backend",
|
|
119
|
+
backend,
|
|
120
|
+
"--watch-root",
|
|
121
|
+
str(cwd),
|
|
122
|
+
"--interval",
|
|
123
|
+
"0.05",
|
|
124
|
+
"--no-network",
|
|
125
|
+
"--output",
|
|
126
|
+
str(output),
|
|
127
|
+
"--",
|
|
128
|
+
*_workload_command(),
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def _run_one(profile: str, *, root: Path, index: str) -> dict[str, float | int]:
|
|
133
|
+
run_dir = root / f"{profile}-{index}"
|
|
134
|
+
run_dir.mkdir(parents=True, exist_ok=True)
|
|
135
|
+
if profile == "off":
|
|
136
|
+
measurement = _measure_command(_workload_command(), cwd=run_dir)
|
|
137
|
+
else:
|
|
138
|
+
output = run_dir / "events.jsonl"
|
|
139
|
+
measurement = _measure_command(
|
|
140
|
+
_instrumented_command(profile, cwd=run_dir, output=output),
|
|
141
|
+
cwd=run_dir,
|
|
142
|
+
)
|
|
143
|
+
measurement["artifact_bytes"] = _directory_size_bytes(run_dir)
|
|
144
|
+
return measurement
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def _median(values: list[float]) -> float:
|
|
148
|
+
return float(statistics.median(values))
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def _percentile(values: list[float], fraction: float) -> float:
|
|
152
|
+
if not values:
|
|
153
|
+
return 0.0
|
|
154
|
+
ordered = sorted(values)
|
|
155
|
+
index = max(0, min(len(ordered) - 1, math.ceil(len(ordered) * fraction) - 1))
|
|
156
|
+
return float(ordered[index])
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def _summarize(
|
|
160
|
+
name: str,
|
|
161
|
+
backend: str,
|
|
162
|
+
measurements: list[dict[str, float | int]],
|
|
163
|
+
*,
|
|
164
|
+
baseline: dict[str, Any] | None,
|
|
165
|
+
) -> dict[str, Any]:
|
|
166
|
+
walls = [float(item["wall_seconds"]) for item in measurements]
|
|
167
|
+
rss = [float(item["peak_tree_rss_bytes"]) for item in measurements]
|
|
168
|
+
artifacts = [float(item["artifact_bytes"]) for item in measurements]
|
|
169
|
+
wall_median_ms = _median(walls) * 1000.0
|
|
170
|
+
rss_median_mb = _median(rss) / (1024.0 * 1024.0)
|
|
171
|
+
artifact_median_kb = _median(artifacts) / 1024.0
|
|
172
|
+
if baseline is None:
|
|
173
|
+
overhead_percent = 0.0
|
|
174
|
+
rss_delta_mb = 0.0
|
|
175
|
+
else:
|
|
176
|
+
baseline_wall = float(baseline["wall_median_ms"])
|
|
177
|
+
baseline_rss = float(baseline["peak_tree_rss_median_mb"])
|
|
178
|
+
overhead_percent = (
|
|
179
|
+
((wall_median_ms / baseline_wall) - 1.0) * 100.0 if baseline_wall else 0.0
|
|
180
|
+
)
|
|
181
|
+
rss_delta_mb = rss_median_mb - baseline_rss
|
|
182
|
+
return {
|
|
183
|
+
"name": name,
|
|
184
|
+
"backend": backend,
|
|
185
|
+
"samples": len(measurements),
|
|
186
|
+
"wall_median_ms": round(wall_median_ms, 3),
|
|
187
|
+
"wall_p95_ms": round(_percentile(walls, 0.95) * 1000.0, 3),
|
|
188
|
+
"runtime_overhead_percent": round(overhead_percent, 3),
|
|
189
|
+
"peak_tree_rss_median_mb": round(rss_median_mb, 3),
|
|
190
|
+
"peak_tree_rss_delta_mb": round(rss_delta_mb, 3),
|
|
191
|
+
"additional_peak_rss_mb": round(max(0.0, rss_delta_mb), 3),
|
|
192
|
+
"artifact_median_kb": round(artifact_median_kb, 3),
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def _cpu_model() -> str:
|
|
197
|
+
cpuinfo = Path("/proc/cpuinfo")
|
|
198
|
+
if cpuinfo.exists():
|
|
199
|
+
try:
|
|
200
|
+
for line in cpuinfo.read_text(encoding="utf-8", errors="replace").splitlines():
|
|
201
|
+
if line.lower().startswith("model name") and ":" in line:
|
|
202
|
+
return line.split(":", 1)[1].strip()
|
|
203
|
+
except OSError:
|
|
204
|
+
pass
|
|
205
|
+
return platform.processor() or platform.machine() or "unknown"
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def _distribution_size_bytes() -> int | None:
|
|
209
|
+
try:
|
|
210
|
+
distribution = importlib.metadata.distribution("execweave")
|
|
211
|
+
except importlib.metadata.PackageNotFoundError:
|
|
212
|
+
return None
|
|
213
|
+
total = 0
|
|
214
|
+
seen = False
|
|
215
|
+
for relative in distribution.files or []:
|
|
216
|
+
try:
|
|
217
|
+
candidate = Path(distribution.locate_file(relative))
|
|
218
|
+
if candidate.is_file():
|
|
219
|
+
total += candidate.stat().st_size
|
|
220
|
+
seen = True
|
|
221
|
+
except OSError:
|
|
222
|
+
continue
|
|
223
|
+
return total if seen else None
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
def run_reference_benchmark(*, iterations: int = 7, strace: str = "auto") -> dict[str, Any]:
|
|
227
|
+
if iterations < 1:
|
|
228
|
+
raise ValueError("iterations must be >= 1")
|
|
229
|
+
if strace not in {"auto", "on", "off"}:
|
|
230
|
+
raise ValueError("strace must be auto, on, or off")
|
|
231
|
+
strace_available = platform.system() == "Linux" and shutil.which("strace") is not None
|
|
232
|
+
if strace == "on" and not strace_available:
|
|
233
|
+
raise RuntimeError("strace was requested but is unavailable")
|
|
234
|
+
backends = ["portable"]
|
|
235
|
+
if strace_available and strace != "off":
|
|
236
|
+
backends.append("strace")
|
|
237
|
+
|
|
238
|
+
with tempfile.TemporaryDirectory(prefix="execweave-reference-benchmark-") as temp:
|
|
239
|
+
root = Path(temp)
|
|
240
|
+
_run_one("off", root=root, index="warmup")
|
|
241
|
+
for backend in backends:
|
|
242
|
+
_run_one(backend, root=root, index="warmup")
|
|
243
|
+
|
|
244
|
+
baseline_measurements = [
|
|
245
|
+
_run_one("off", root=root, index=str(index)) for index in range(iterations)
|
|
246
|
+
]
|
|
247
|
+
baseline = _summarize(
|
|
248
|
+
"ExecWeave OFF",
|
|
249
|
+
"off",
|
|
250
|
+
baseline_measurements,
|
|
251
|
+
baseline=None,
|
|
252
|
+
)
|
|
253
|
+
profiles = [baseline]
|
|
254
|
+
for backend in backends:
|
|
255
|
+
measurements = [
|
|
256
|
+
_run_one(backend, root=root, index=str(index)) for index in range(iterations)
|
|
257
|
+
]
|
|
258
|
+
profiles.append(
|
|
259
|
+
_summarize(
|
|
260
|
+
f"{backend.capitalize()} ON",
|
|
261
|
+
backend,
|
|
262
|
+
measurements,
|
|
263
|
+
baseline=baseline,
|
|
264
|
+
)
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
distribution_bytes = _distribution_size_bytes()
|
|
268
|
+
return {
|
|
269
|
+
"schema_version": "0.1",
|
|
270
|
+
"generated_at": datetime.now(timezone.utc).isoformat().replace("+00:00", "Z"),
|
|
271
|
+
"execweave_version": __version__,
|
|
272
|
+
"workload": {
|
|
273
|
+
"id": _WORKLOAD_ID,
|
|
274
|
+
"description": "fixed file read/write/hash operations plus short-lived Python subprocesses",
|
|
275
|
+
},
|
|
276
|
+
"iterations": iterations,
|
|
277
|
+
"environment": {
|
|
278
|
+
"os": platform.platform(),
|
|
279
|
+
"python": platform.python_version(),
|
|
280
|
+
"machine": platform.machine(),
|
|
281
|
+
"cpu_model": _cpu_model(),
|
|
282
|
+
"logical_cpus": psutil.cpu_count(logical=True),
|
|
283
|
+
"memory_total_mb": round(psutil.virtual_memory().total / (1024.0 * 1024.0), 1),
|
|
284
|
+
},
|
|
285
|
+
"package": {
|
|
286
|
+
"distribution_kb": (
|
|
287
|
+
round(distribution_bytes / 1024.0, 3) if distribution_bytes is not None else None
|
|
288
|
+
),
|
|
289
|
+
"scope": "ExecWeave distribution files only; Python and dependency footprints excluded",
|
|
290
|
+
},
|
|
291
|
+
"profiles": profiles,
|
|
292
|
+
"interpretation": {
|
|
293
|
+
"x": "additional_peak_rss_mb",
|
|
294
|
+
"y": "runtime_overhead_percent",
|
|
295
|
+
"bubble": "artifact_median_kb",
|
|
296
|
+
"preferred_region": "lower-left",
|
|
297
|
+
"warning": "Reference microbenchmark only; rerun on the target host before making capacity claims.",
|
|
298
|
+
},
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
def _nice_ceiling(value: float, minimum: float) -> float:
|
|
303
|
+
value = max(value, minimum)
|
|
304
|
+
magnitude = 10 ** math.floor(math.log10(value)) if value > 0 else 1
|
|
305
|
+
scaled = value / magnitude
|
|
306
|
+
if scaled <= 1:
|
|
307
|
+
step = 1
|
|
308
|
+
elif scaled <= 2:
|
|
309
|
+
step = 2
|
|
310
|
+
elif scaled <= 5:
|
|
311
|
+
step = 5
|
|
312
|
+
else:
|
|
313
|
+
step = 10
|
|
314
|
+
return step * magnitude
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
def render_tradeoff_svg(report: dict[str, Any]) -> str:
|
|
318
|
+
profiles = [profile for profile in report.get("profiles", []) if isinstance(profile, dict)]
|
|
319
|
+
x_values = [max(0.0, float(profile.get("additional_peak_rss_mb", 0.0))) for profile in profiles]
|
|
320
|
+
y_values = [float(profile.get("runtime_overhead_percent", 0.0)) for profile in profiles]
|
|
321
|
+
x_max = _nice_ceiling(max(x_values, default=0.0) * 1.25, 8.0)
|
|
322
|
+
y_min = min(0.0, min(y_values, default=0.0) * 1.15)
|
|
323
|
+
y_max = _nice_ceiling(max(y_values, default=0.0) * 1.25, 10.0)
|
|
324
|
+
if y_max <= y_min:
|
|
325
|
+
y_max = y_min + 10.0
|
|
326
|
+
|
|
327
|
+
width, height = 980, 640
|
|
328
|
+
left, right, top, bottom = 110, 70, 125, 110
|
|
329
|
+
plot_w = width - left - right
|
|
330
|
+
plot_h = height - top - bottom
|
|
331
|
+
|
|
332
|
+
def sx(value: float) -> float:
|
|
333
|
+
return left + (max(0.0, value) / x_max) * plot_w
|
|
334
|
+
|
|
335
|
+
def sy(value: float) -> float:
|
|
336
|
+
return top + ((y_max - value) / (y_max - y_min)) * plot_h
|
|
337
|
+
|
|
338
|
+
colors = {"off": "#64748b", "portable": "#2563eb", "strace": "#7c3aed"}
|
|
339
|
+
env = report.get("environment") or {}
|
|
340
|
+
subtitle = f"{env.get('os', 'unknown OS')} · Python {env.get('python', '?')} · n={report.get('iterations', '?')}"
|
|
341
|
+
lines = [
|
|
342
|
+
f'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {width} {height}" role="img" aria-labelledby="title desc">',
|
|
343
|
+
'<title id="title">ExecWeave runtime overhead versus memory footprint</title>',
|
|
344
|
+
'<desc id="desc">Lower-left is better. Bubble area indicates median artifact size per reference run.</desc>',
|
|
345
|
+
'<rect width="100%" height="100%" rx="24" fill="#ffffff"/>',
|
|
346
|
+
'<text x="70" y="54" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-size="28" font-weight="700" fill="#0f172a">ExecWeave overhead trade-off</text>',
|
|
347
|
+
f'<text x="70" y="83" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-size="14" fill="#64748b">{html.escape(subtitle)}</text>',
|
|
348
|
+
'<text x="910" y="54" text-anchor="end" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-size="13" font-weight="600" fill="#16a34a">LOWER-LEFT IS BETTER ↙</text>',
|
|
349
|
+
]
|
|
350
|
+
|
|
351
|
+
for index in range(6):
|
|
352
|
+
fraction = index / 5
|
|
353
|
+
x = left + fraction * plot_w
|
|
354
|
+
value = fraction * x_max
|
|
355
|
+
lines.append(f'<line x1="{x:.1f}" y1="{top}" x2="{x:.1f}" y2="{top + plot_h}" stroke="#e2e8f0" stroke-width="1"/>')
|
|
356
|
+
lines.append(f'<text x="{x:.1f}" y="{top + plot_h + 28}" text-anchor="middle" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-size="12" fill="#64748b">{value:.0f}</text>')
|
|
357
|
+
for index in range(6):
|
|
358
|
+
fraction = index / 5
|
|
359
|
+
y = top + fraction * plot_h
|
|
360
|
+
value = y_max - fraction * (y_max - y_min)
|
|
361
|
+
lines.append(f'<line x1="{left}" y1="{y:.1f}" x2="{left + plot_w}" y2="{y:.1f}" stroke="#e2e8f0" stroke-width="1"/>')
|
|
362
|
+
lines.append(f'<text x="{left - 18}" y="{y + 4:.1f}" text-anchor="end" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-size="12" fill="#64748b">{value:.0f}</text>')
|
|
363
|
+
|
|
364
|
+
lines.extend(
|
|
365
|
+
[
|
|
366
|
+
f'<line x1="{left}" y1="{top + plot_h}" x2="{left + plot_w}" y2="{top + plot_h}" stroke="#334155" stroke-width="1.5"/>',
|
|
367
|
+
f'<line x1="{left}" y1="{top}" x2="{left}" y2="{top + plot_h}" stroke="#334155" stroke-width="1.5"/>',
|
|
368
|
+
f'<text x="{left + plot_w / 2:.1f}" y="{height - 45}" text-anchor="middle" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-size="15" font-weight="600" fill="#334155">Additional peak process-tree RSS (MB) → higher</text>',
|
|
369
|
+
f'<text x="32" y="{top + plot_h / 2:.1f}" transform="rotate(-90 32 {top + plot_h / 2:.1f})" text-anchor="middle" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-size="15" font-weight="600" fill="#334155">Runtime overhead (%) → higher</text>',
|
|
370
|
+
]
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
for profile in profiles:
|
|
374
|
+
backend = str(profile.get("backend", "unknown"))
|
|
375
|
+
x_value = max(0.0, float(profile.get("additional_peak_rss_mb", 0.0)))
|
|
376
|
+
y_value = float(profile.get("runtime_overhead_percent", 0.0))
|
|
377
|
+
artifact = max(0.0, float(profile.get("artifact_median_kb", 0.0)))
|
|
378
|
+
radius = 8.0 if backend == "off" else min(28.0, 10.0 + math.sqrt(artifact) * 0.9)
|
|
379
|
+
x, y = sx(x_value), sy(y_value)
|
|
380
|
+
color = colors.get(backend, "#0f766e")
|
|
381
|
+
name = html.escape(str(profile.get("name", backend)))
|
|
382
|
+
detail = html.escape(f"+{x_value:.1f} MB RSS · {y_value:+.1f}% time · {artifact:.1f} KB/run")
|
|
383
|
+
label_x = x + 16
|
|
384
|
+
label_y = y - radius - 8
|
|
385
|
+
if backend == "off":
|
|
386
|
+
label_y = y - 18
|
|
387
|
+
lines.append(f'<circle cx="{x:.1f}" cy="{y:.1f}" r="{radius:.1f}" fill="{color}" fill-opacity="0.88" stroke="#ffffff" stroke-width="3"/>')
|
|
388
|
+
lines.append(f'<text x="{label_x:.1f}" y="{label_y:.1f}" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-size="14" font-weight="700" fill="#0f172a">{name}</text>')
|
|
389
|
+
lines.append(f'<text x="{label_x:.1f}" y="{label_y + 19:.1f}" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-size="11" fill="#64748b">{detail}</text>')
|
|
390
|
+
|
|
391
|
+
package = report.get("package") or {}
|
|
392
|
+
package_kb = package.get("distribution_kb")
|
|
393
|
+
package_text = f"Package footprint: {package_kb:.1f} KB (ExecWeave files only)" if isinstance(package_kb, (int, float)) else "Package footprint unavailable"
|
|
394
|
+
lines.extend(
|
|
395
|
+
[
|
|
396
|
+
f'<text x="{left}" y="{height - 18}" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-size="11" fill="#94a3b8">Bubble area ≈ median residual artifact size per run · {html.escape(package_text)}</text>',
|
|
397
|
+
'</svg>',
|
|
398
|
+
]
|
|
399
|
+
)
|
|
400
|
+
return "\n".join(lines) + "\n"
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
def _write_text(path: Path, content: str) -> Path:
|
|
404
|
+
destination = path.expanduser().resolve()
|
|
405
|
+
destination.parent.mkdir(parents=True, exist_ok=True)
|
|
406
|
+
destination.write_text(content, encoding="utf-8")
|
|
407
|
+
return destination
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
411
|
+
parser = argparse.ArgumentParser(
|
|
412
|
+
prog="execweave-overhead",
|
|
413
|
+
description="Measure ExecWeave runtime overhead and render a reproducible trade-off chart.",
|
|
414
|
+
)
|
|
415
|
+
parser.add_argument("--iterations", type=int, default=7)
|
|
416
|
+
parser.add_argument("--strace", choices=["auto", "on", "off"], default="auto")
|
|
417
|
+
parser.add_argument("--output-json", type=Path, default=None)
|
|
418
|
+
parser.add_argument("--output-svg", type=Path, default=None)
|
|
419
|
+
return parser
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
def main(argv: list[str] | None = None) -> int:
|
|
423
|
+
parser = build_parser()
|
|
424
|
+
args = parser.parse_args(argv)
|
|
425
|
+
try:
|
|
426
|
+
report = run_reference_benchmark(iterations=args.iterations, strace=args.strace)
|
|
427
|
+
except (RuntimeError, ValueError) as exc:
|
|
428
|
+
parser.error(str(exc))
|
|
429
|
+
rendered = json.dumps(report, indent=2, sort_keys=True)
|
|
430
|
+
print(rendered)
|
|
431
|
+
print("EXECWEAVE_BENCHMARK_RESULT=" + json.dumps(report, sort_keys=True, separators=(",", ":")))
|
|
432
|
+
if args.output_json is not None:
|
|
433
|
+
_write_text(args.output_json, rendered + "\n")
|
|
434
|
+
if args.output_svg is not None:
|
|
435
|
+
_write_text(args.output_svg, render_tradeoff_svg(report))
|
|
436
|
+
return 0
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
if __name__ == "__main__":
|
|
440
|
+
raise SystemExit(main())
|