@yuhere/js-jsonrpc2 2.1.12 → 2.1.13
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.
- package/dist/cli/cli.d.ts +0 -1
- package/dist/cli/cli.js +0 -1
- package/dist/cli/demo-methods.d.ts +0 -1
- package/dist/cli/demo-methods.js +0 -1
- package/dist/cli/express.d.ts +0 -1
- package/dist/cli/express.js +0 -1
- package/dist/cli/stdio.d.ts +0 -1
- package/dist/cli/stdio.js +0 -1
- package/dist/core/Repository.d.ts +0 -1
- package/dist/core/Repository.js +0 -1
- package/dist/core/convert.d.ts +0 -1
- package/dist/core/convert.js +0 -1
- package/dist/core/descriptor.d.ts +0 -1
- package/dist/core/descriptor.js +0 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -1
- package/dist/core/llm-tools.d.ts +0 -1
- package/dist/core/llm-tools.js +0 -1
- package/dist/core/permission.d.ts +0 -1
- package/dist/core/permission.js +0 -1
- package/dist/core/spec-check.d.ts +0 -1
- package/dist/core/spec-check.js +0 -1
- package/dist/core/system-methods.d.ts +0 -1
- package/dist/core/system-methods.js +0 -1
- package/dist/errors/RPCError.d.ts +0 -1
- package/dist/errors/RPCError.js +0 -1
- package/dist/errors/codes.d.ts +0 -1
- package/dist/errors/codes.js +0 -1
- package/dist/errors/index.d.ts +0 -1
- package/dist/errors/index.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/metrics/memory.d.ts +0 -1
- package/dist/metrics/memory.js +0 -1
- package/dist/metrics/prom.d.ts +0 -1
- package/dist/metrics/prom.js +0 -1
- package/dist/schema/json/index.d.ts +0 -1
- package/dist/schema/json/index.js +0 -1
- package/dist/schema/json/marker.d.ts +0 -1
- package/dist/schema/json/marker.js +0 -1
- package/dist/schema/json/primitives.d.ts +0 -1
- package/dist/schema/json/primitives.js +0 -1
- package/dist/schema/z/protocol.d.ts +0 -1
- package/dist/schema/z/protocol.js +0 -1
- package/dist/schema/z/register.d.ts +0 -1
- package/dist/schema/z/register.js +0 -1
- package/dist/stream/stringify-stream.d.ts +0 -1
- package/dist/stream/stringify-stream.js +94 -70
- package/dist/transport/express/body.d.ts +0 -1
- package/dist/transport/express/body.js +0 -1
- package/dist/transport/express/index.d.ts +0 -1
- package/dist/transport/express/index.js +0 -1
- package/dist/transport/express/middleware.d.ts +0 -1
- package/dist/transport/express/middleware.js +0 -1
- package/dist/transport/express/respond.d.ts +0 -1
- package/dist/transport/express/respond.js +0 -1
- package/dist/transport/stdio/index.d.ts +0 -1
- package/dist/transport/stdio/index.js +0 -1
- package/dist/transport/stdio/middleware.d.ts +0 -1
- package/dist/transport/stdio/middleware.js +0 -1
- package/dist/transport/ws/index.d.ts +0 -1
- package/dist/transport/ws/index.js +0 -1
- package/dist/transport/ws/middleware.d.ts +0 -1
- package/dist/transport/ws/middleware.js +0 -1
- package/dist/transport/ws/standalone.d.ts +0 -1
- package/dist/transport/ws/standalone.js +0 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.js +0 -1
- package/dist/webclient/webui/src/client/httpTransport.d.ts +8 -0
- package/dist/webclient/webui/src/client/httpTransport.js +114 -0
- package/dist/webclient/webui/src/client/index.d.ts +4 -0
- package/dist/webclient/webui/src/client/index.js +2 -0
- package/dist/webclient/webui/src/client/rpc.d.ts +24 -0
- package/dist/webclient/webui/src/client/rpc.js +32 -0
- package/dist/webclient/webui/src/client/types.d.ts +14 -0
- package/dist/webclient/webui/src/client/types.js +1 -0
- package/dist/webclient/webui/src/client/wsTransport.d.ts +8 -0
- package/{webui/src/api/wsTransport.ts → dist/webclient/webui/src/client/wsTransport.js} +263 -305
- package/htdoc/assets/favicon-CXdFuLlv.png +0 -0
- package/htdoc/assets/{index-Cr0Jnrgb.js → index-CqI7vRAS.js} +1191 -327
- package/htdoc/assets/index-CqI7vRAS.js.map +1 -0
- package/{webui/src/styles/geek.css → htdoc/assets/index-Rq1yIwo2.css} +58 -0
- package/htdoc/index.html +4 -2
- package/package.json +10 -7
- package/dist/cli/cli.d.ts.map +0 -1
- package/dist/cli/cli.js.map +0 -1
- package/dist/cli/demo-methods.d.ts.map +0 -1
- package/dist/cli/demo-methods.js.map +0 -1
- package/dist/cli/express.d.ts.map +0 -1
- package/dist/cli/express.js.map +0 -1
- package/dist/cli/stdio.d.ts.map +0 -1
- package/dist/cli/stdio.js.map +0 -1
- package/dist/core/Repository.d.ts.map +0 -1
- package/dist/core/Repository.js.map +0 -1
- package/dist/core/convert.d.ts.map +0 -1
- package/dist/core/convert.js.map +0 -1
- package/dist/core/descriptor.d.ts.map +0 -1
- package/dist/core/descriptor.js.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/llm-tools.d.ts.map +0 -1
- package/dist/core/llm-tools.js.map +0 -1
- package/dist/core/permission.d.ts.map +0 -1
- package/dist/core/permission.js.map +0 -1
- package/dist/core/spec-check.d.ts.map +0 -1
- package/dist/core/spec-check.js.map +0 -1
- package/dist/core/system-methods.d.ts.map +0 -1
- package/dist/core/system-methods.js.map +0 -1
- package/dist/errors/RPCError.d.ts.map +0 -1
- package/dist/errors/RPCError.js.map +0 -1
- package/dist/errors/codes.d.ts.map +0 -1
- package/dist/errors/codes.js.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/metrics/memory.d.ts.map +0 -1
- package/dist/metrics/memory.js.map +0 -1
- package/dist/metrics/prom.d.ts.map +0 -1
- package/dist/metrics/prom.js.map +0 -1
- package/dist/schema/json/index.d.ts.map +0 -1
- package/dist/schema/json/index.js.map +0 -1
- package/dist/schema/json/marker.d.ts.map +0 -1
- package/dist/schema/json/marker.js.map +0 -1
- package/dist/schema/json/primitives.d.ts.map +0 -1
- package/dist/schema/json/primitives.js.map +0 -1
- package/dist/schema/z/protocol.d.ts.map +0 -1
- package/dist/schema/z/protocol.js.map +0 -1
- package/dist/schema/z/register.d.ts.map +0 -1
- package/dist/schema/z/register.js.map +0 -1
- package/dist/stream/stringify-stream.d.ts.map +0 -1
- package/dist/stream/stringify-stream.js.map +0 -1
- package/dist/transport/express/body.d.ts.map +0 -1
- package/dist/transport/express/body.js.map +0 -1
- package/dist/transport/express/index.d.ts.map +0 -1
- package/dist/transport/express/index.js.map +0 -1
- package/dist/transport/express/middleware.d.ts.map +0 -1
- package/dist/transport/express/middleware.js.map +0 -1
- package/dist/transport/express/respond.d.ts.map +0 -1
- package/dist/transport/express/respond.js.map +0 -1
- package/dist/transport/stdio/index.d.ts.map +0 -1
- package/dist/transport/stdio/index.js.map +0 -1
- package/dist/transport/stdio/middleware.d.ts.map +0 -1
- package/dist/transport/stdio/middleware.js.map +0 -1
- package/dist/transport/ws/index.d.ts.map +0 -1
- package/dist/transport/ws/index.js.map +0 -1
- package/dist/transport/ws/middleware.d.ts.map +0 -1
- package/dist/transport/ws/middleware.js.map +0 -1
- package/dist/transport/ws/standalone.d.ts.map +0 -1
- package/dist/transport/ws/standalone.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/htdoc/assets/index-Ck-39Igh.css +0 -963
- package/htdoc/assets/index-Cr0Jnrgb.js.map +0 -1
- package/webui/index.html +0 -12
- package/webui/src/App.tsx +0 -164
- package/webui/src/api/docGen.ts +0 -188
- package/webui/src/api/glob.ts +0 -90
- package/webui/src/api/httpTransport.ts +0 -148
- package/webui/src/api/metrics.ts +0 -135
- package/webui/src/api/paramForm.ts +0 -80
- package/webui/src/api/rpc.ts +0 -57
- package/webui/src/api/schema.ts +0 -12
- package/webui/src/api/types.ts +0 -16
- package/webui/src/components/MethodDetail.tsx +0 -43
- package/webui/src/components/MethodTree.tsx +0 -118
- package/webui/src/components/MetricsPanel.md +0 -126
- package/webui/src/components/MetricsPanel.tsx +0 -290
- package/webui/src/components/SchemaForm.tsx +0 -697
- package/webui/src/components/SchemaView.tsx +0 -151
- package/webui/src/components/TestPanel.tsx +0 -322
- package/webui/src/components/Toolbar.tsx +0 -82
- package/webui/src/hooks/useMethodDetail.ts +0 -61
- package/webui/src/hooks/useMethods.ts +0 -27
- package/webui/src/hooks/useMetrics.ts +0 -91
- package/webui/src/main.tsx +0 -13
- package/webui/src/theme/ThemeProvider.tsx +0 -79
- package/webui/src/vite-env.d.ts +0 -1
- package/webui/tsconfig.json +0 -34
- package/webui/tsconfig.node.json +0 -13
- package/webui/vite.config.ts +0 -15
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
deriveMethod,
|
|
4
|
-
type MethodDerived,
|
|
5
|
-
type MetricsSnapshot,
|
|
6
|
-
} from '../api/metrics';
|
|
7
|
-
|
|
8
|
-
interface MetricsPanelProps {
|
|
9
|
-
snapshot: MetricsSnapshot | undefined;
|
|
10
|
-
previous: { snapshot: MetricsSnapshot; fetchedAt: number } | undefined;
|
|
11
|
-
fetchedAt: number | undefined;
|
|
12
|
-
loading: boolean;
|
|
13
|
-
error: string | null;
|
|
14
|
-
available: boolean;
|
|
15
|
-
onRefresh: () => void;
|
|
16
|
-
autoRefresh: boolean;
|
|
17
|
-
onAutoRefreshChange: (v: boolean) => void;
|
|
18
|
-
intervalMs: number;
|
|
19
|
-
onIntervalChange: (v: number) => void;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function formatDuration(seconds: number): string {
|
|
23
|
-
if (!Number.isFinite(seconds) || seconds <= 0) return '—';
|
|
24
|
-
if (seconds < 0.001) return `${(seconds * 1e6).toFixed(0)} µs`;
|
|
25
|
-
if (seconds < 1) return `${(seconds * 1000).toFixed(1)} ms`;
|
|
26
|
-
if (seconds < 60) return `${seconds.toFixed(2)} s`;
|
|
27
|
-
return `${(seconds / 60).toFixed(1)} min`;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function formatRate(v: number | undefined): string {
|
|
31
|
-
if (v === undefined) return '—';
|
|
32
|
-
if (v >= 100) return v.toFixed(0);
|
|
33
|
-
if (v >= 10) return v.toFixed(1);
|
|
34
|
-
return v.toFixed(2);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function formatPercent(v: number): string {
|
|
38
|
-
if (!Number.isFinite(v)) return '—';
|
|
39
|
-
return `${(v * 100).toFixed(1)}%`;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function rateClass(v: number | undefined): string {
|
|
43
|
-
if (v === undefined) return '';
|
|
44
|
-
if (v > 100) return 'rate-hot';
|
|
45
|
-
if (v > 10) return 'rate-warm';
|
|
46
|
-
return 'rate-cold';
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function MetricsPanel({
|
|
50
|
-
snapshot,
|
|
51
|
-
previous,
|
|
52
|
-
fetchedAt,
|
|
53
|
-
loading,
|
|
54
|
-
error,
|
|
55
|
-
available,
|
|
56
|
-
onRefresh,
|
|
57
|
-
autoRefresh,
|
|
58
|
-
onAutoRefreshChange,
|
|
59
|
-
intervalMs,
|
|
60
|
-
onIntervalChange,
|
|
61
|
-
}: MetricsPanelProps) {
|
|
62
|
-
const derived = useMemo<MethodDerived[]>(() => {
|
|
63
|
-
if (!snapshot) return [];
|
|
64
|
-
const dtSeconds =
|
|
65
|
-
previous && fetchedAt
|
|
66
|
-
? (fetchedAt - previous.fetchedAt) / 1000
|
|
67
|
-
: undefined;
|
|
68
|
-
const rows: MethodDerived[] = [];
|
|
69
|
-
for (const [method, stats] of Object.entries(snapshot.methods)) {
|
|
70
|
-
const prev = previous?.snapshot.methods[method];
|
|
71
|
-
rows.push(deriveMethod(method, stats, prev, dtSeconds));
|
|
72
|
-
}
|
|
73
|
-
rows.sort((a, b) => b.stats.calls - a.stats.calls);
|
|
74
|
-
return rows;
|
|
75
|
-
}, [snapshot, previous, fetchedAt]);
|
|
76
|
-
|
|
77
|
-
// 只按「是否产生过流式调用」分组;一旦 opened>0 即视为 stream method。
|
|
78
|
-
const streamMethods = derived.filter((r) => r.stats.streams.opened > 0);
|
|
79
|
-
const nonStreamMethods = derived.filter((r) => r.stats.streams.opened === 0);
|
|
80
|
-
|
|
81
|
-
const totals = useMemo(() => {
|
|
82
|
-
if (!snapshot) return { calls: 0, errors: 0, methods: 0, streams: 0 };
|
|
83
|
-
let calls = 0;
|
|
84
|
-
let errors = 0;
|
|
85
|
-
let streams = 0;
|
|
86
|
-
for (const s of Object.values(snapshot.methods)) {
|
|
87
|
-
calls += s.calls;
|
|
88
|
-
errors += Object.values(s.errorsByCode).reduce((a, b) => a + b, 0);
|
|
89
|
-
streams += s.streams.opened;
|
|
90
|
-
}
|
|
91
|
-
return { calls, errors, methods: Object.keys(snapshot.methods).length, streams };
|
|
92
|
-
}, [snapshot]);
|
|
93
|
-
|
|
94
|
-
if (!available) {
|
|
95
|
-
return (
|
|
96
|
-
<section className="metrics">
|
|
97
|
-
<h2>Metrics</h2>
|
|
98
|
-
<p className="hint">
|
|
99
|
-
服务端未启用 <code>system.metrics</code>(<code>withSystemMethods: false</code> 或未注册)。
|
|
100
|
-
</p>
|
|
101
|
-
</section>
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return (
|
|
106
|
-
<section className="metrics">
|
|
107
|
-
<header className="metrics-header">
|
|
108
|
-
<h2>Metrics</h2>
|
|
109
|
-
<div className="metrics-controls">
|
|
110
|
-
<label className="metrics-auto">
|
|
111
|
-
<input
|
|
112
|
-
type="checkbox"
|
|
113
|
-
checked={autoRefresh}
|
|
114
|
-
onChange={(e) => onAutoRefreshChange(e.target.checked)}
|
|
115
|
-
/>
|
|
116
|
-
自动刷新
|
|
117
|
-
</label>
|
|
118
|
-
<select
|
|
119
|
-
className="sf-input"
|
|
120
|
-
value={intervalMs}
|
|
121
|
-
onChange={(e) => onIntervalChange(Number(e.target.value))}
|
|
122
|
-
disabled={!autoRefresh}
|
|
123
|
-
title="刷新间隔"
|
|
124
|
-
>
|
|
125
|
-
<option value={1000}>1s</option>
|
|
126
|
-
<option value={3000}>3s</option>
|
|
127
|
-
<option value={5000}>5s</option>
|
|
128
|
-
<option value={10000}>10s</option>
|
|
129
|
-
</select>
|
|
130
|
-
<button onClick={onRefresh} disabled={loading}>
|
|
131
|
-
{loading ? '刷新中…' : '立即刷新'}
|
|
132
|
-
</button>
|
|
133
|
-
{snapshot && (
|
|
134
|
-
<span className="hint">
|
|
135
|
-
uptime {formatDuration(snapshot.uptimeMs / 1000)}
|
|
136
|
-
</span>
|
|
137
|
-
)}
|
|
138
|
-
</div>
|
|
139
|
-
</header>
|
|
140
|
-
|
|
141
|
-
{error && <p className="error">{error}</p>}
|
|
142
|
-
{!snapshot && !error && <p className="hint">加载中…</p>}
|
|
143
|
-
|
|
144
|
-
{snapshot && (
|
|
145
|
-
<>
|
|
146
|
-
<div className="metrics-cards">
|
|
147
|
-
<MetricCard label="Methods" value={String(totals.methods)} />
|
|
148
|
-
<MetricCard label="Calls" value={String(totals.calls)} />
|
|
149
|
-
<MetricCard label="Streams" value={String(totals.streams)} />
|
|
150
|
-
<MetricCard
|
|
151
|
-
label="Errors"
|
|
152
|
-
value={String(totals.errors)}
|
|
153
|
-
tone={totals.errors > 0 ? 'danger' : undefined}
|
|
154
|
-
/>
|
|
155
|
-
<MetricCard
|
|
156
|
-
label="Error rate"
|
|
157
|
-
value={totals.calls > 0 ? formatPercent(totals.errors / totals.calls) : '—'}
|
|
158
|
-
tone={totals.calls > 0 && totals.errors / totals.calls > 0.05 ? 'danger' : undefined}
|
|
159
|
-
/>
|
|
160
|
-
<MetricCard
|
|
161
|
-
label="Invalid requests"
|
|
162
|
-
value={String(snapshot.invalidRequests)}
|
|
163
|
-
tone={snapshot.invalidRequests > 0 ? 'warn' : undefined}
|
|
164
|
-
/>
|
|
165
|
-
</div>
|
|
166
|
-
|
|
167
|
-
<h3>
|
|
168
|
-
Non-stream methods
|
|
169
|
-
<span className="hint"> ({nonStreamMethods.length})</span>
|
|
170
|
-
</h3>
|
|
171
|
-
{nonStreamMethods.length === 0 ? (
|
|
172
|
-
<p className="hint">暂无数据。</p>
|
|
173
|
-
) : (
|
|
174
|
-
<NonStreamTable rows={nonStreamMethods} />
|
|
175
|
-
)}
|
|
176
|
-
|
|
177
|
-
<h3>
|
|
178
|
-
Stream methods
|
|
179
|
-
<span className="hint"> ({streamMethods.length})</span>
|
|
180
|
-
</h3>
|
|
181
|
-
{streamMethods.length === 0 ? (
|
|
182
|
-
<p className="hint">暂无流式调用。</p>
|
|
183
|
-
) : (
|
|
184
|
-
<StreamTable rows={streamMethods} />
|
|
185
|
-
)}
|
|
186
|
-
</>
|
|
187
|
-
)}
|
|
188
|
-
</section>
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
function MetricCard({ label, value, tone }: { label: string; value: string; tone?: 'danger' | 'warn' }) {
|
|
193
|
-
return (
|
|
194
|
-
<div className={`metric-card${tone ? ` metric-card-${tone}` : ''}`}>
|
|
195
|
-
<div className="metric-card-label">{label}</div>
|
|
196
|
-
<div className="metric-card-value">{value}</div>
|
|
197
|
-
</div>
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function NonStreamTable({ rows }: { rows: MethodDerived[] }) {
|
|
202
|
-
return (
|
|
203
|
-
<table className="metrics-table">
|
|
204
|
-
<thead>
|
|
205
|
-
<tr>
|
|
206
|
-
<th>method</th>
|
|
207
|
-
<th className="num">calls</th>
|
|
208
|
-
<th className="num">rate/s</th>
|
|
209
|
-
<th className="num">errors</th>
|
|
210
|
-
<th className="num">err%</th>
|
|
211
|
-
<th className="num">p50</th>
|
|
212
|
-
<th className="num">p95</th>
|
|
213
|
-
<th className="num">p99</th>
|
|
214
|
-
<th className="num">avg</th>
|
|
215
|
-
</tr>
|
|
216
|
-
</thead>
|
|
217
|
-
<tbody>
|
|
218
|
-
{rows.map((r) => {
|
|
219
|
-
const errorCount = Object.values(r.stats.errorsByCode).reduce((a, b) => a + b, 0);
|
|
220
|
-
const avg =
|
|
221
|
-
r.stats.duration.count > 0
|
|
222
|
-
? r.stats.duration.sum / r.stats.duration.count
|
|
223
|
-
: 0;
|
|
224
|
-
return (
|
|
225
|
-
<tr key={r.method}>
|
|
226
|
-
<td className="method-name" title={r.method}>{r.method}</td>
|
|
227
|
-
<td className="num">{r.stats.calls}</td>
|
|
228
|
-
<td className={`num ${rateClass(r.callsPerSecond)}`}>{formatRate(r.callsPerSecond)}</td>
|
|
229
|
-
<td className={`num${errorCount > 0 ? ' error' : ''}`}>{errorCount}</td>
|
|
230
|
-
<td className={`num${r.errorRate > 0.05 ? ' error' : ''}`}>{formatPercent(r.errorRate)}</td>
|
|
231
|
-
<td className="num">{formatDuration(r.p50)}</td>
|
|
232
|
-
<td className="num">{formatDuration(r.p95)}</td>
|
|
233
|
-
<td className="num">{formatDuration(r.p99)}</td>
|
|
234
|
-
<td className="num">{formatDuration(avg)}</td>
|
|
235
|
-
</tr>
|
|
236
|
-
);
|
|
237
|
-
})}
|
|
238
|
-
</tbody>
|
|
239
|
-
</table>
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
function StreamTable({ rows }: { rows: MethodDerived[] }) {
|
|
244
|
-
return (
|
|
245
|
-
<table className="metrics-table">
|
|
246
|
-
<thead>
|
|
247
|
-
<tr>
|
|
248
|
-
<th>method</th>
|
|
249
|
-
<th className="num">opened</th>
|
|
250
|
-
<th className="num">completed</th>
|
|
251
|
-
<th className="num">failed</th>
|
|
252
|
-
<th className="num">aborted</th>
|
|
253
|
-
<th className="num">complete%</th>
|
|
254
|
-
<th className="num">abort%</th>
|
|
255
|
-
<th className="num">avg chunks</th>
|
|
256
|
-
<th className="num">ttfb p50</th>
|
|
257
|
-
<th className="num">ttfb p95</th>
|
|
258
|
-
<th className="num">duration avg</th>
|
|
259
|
-
</tr>
|
|
260
|
-
</thead>
|
|
261
|
-
<tbody>
|
|
262
|
-
{rows.map((r) => (
|
|
263
|
-
<tr key={r.method}>
|
|
264
|
-
<td className="method-name" title={r.method}>{r.method}</td>
|
|
265
|
-
<td className="num">{r.stats.streams.opened}</td>
|
|
266
|
-
<td className="num">{r.stats.streams.completed}</td>
|
|
267
|
-
<td className={`num${r.stats.streams.failed > 0 ? ' error' : ''}`}>
|
|
268
|
-
{r.stats.streams.failed}
|
|
269
|
-
</td>
|
|
270
|
-
<td className={`num${r.stats.streams.aborted > 0 ? ' warn' : ''}`}>
|
|
271
|
-
{r.stats.streams.aborted}
|
|
272
|
-
</td>
|
|
273
|
-
<td className="num">{formatPercent(r.streamCompletionRate)}</td>
|
|
274
|
-
<td className="num">{formatPercent(r.streamAbortRate)}</td>
|
|
275
|
-
<td className="num">{r.avgChunksPerStream.toFixed(1)}</td>
|
|
276
|
-
<td className="num">{formatDuration(r.ttfbP50)}</td>
|
|
277
|
-
<td className="num">{formatDuration(r.ttfbP95)}</td>
|
|
278
|
-
<td className="num">
|
|
279
|
-
{formatDuration(
|
|
280
|
-
r.stats.streamDuration.count > 0
|
|
281
|
-
? r.stats.streamDuration.sum / r.stats.streamDuration.count
|
|
282
|
-
: 0,
|
|
283
|
-
)}
|
|
284
|
-
</td>
|
|
285
|
-
</tr>
|
|
286
|
-
))}
|
|
287
|
-
</tbody>
|
|
288
|
-
</table>
|
|
289
|
-
);
|
|
290
|
-
}
|