dsh-recent-usage-metrics 0.3.5 → 0.3.6
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/CHANGELOG.md +6 -0
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/client/client.js +56 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.en.md
CHANGED
|
@@ -153,7 +153,7 @@ Every drawer column and every header carries a hint:
|
|
|
153
153
|
| Speed column | the model that served that row |
|
|
154
154
|
| Tokens column | input tokens (with thousands separators, e.g. `370,683 tok`) and cache hit rate |
|
|
155
155
|
| Time column | how much of the request was tool time, both summed and parallel-merged |
|
|
156
|
-
| Headers | what the column measures (the `#` header draws the four state glyphs) |
|
|
156
|
+
| Headers | what the column measures (the `#` header draws the four state glyphs and swatches for the two row colours) |
|
|
157
157
|
|
|
158
158
|
**Row highlights:**
|
|
159
159
|
|
package/README.md
CHANGED
|
@@ -137,7 +137,7 @@ DSH 的极客级请求指标。它在 **设置 → 通用 → 性能与用量**
|
|
|
137
137
|
| 速度列 | 该行使用的模型 |
|
|
138
138
|
| 输出 Token 列 | 输入 token(带千分位,如 `370,683 tok`)与缓存命中率 |
|
|
139
139
|
| 总用时列 | 工具调用的用时(串行累加与并行合并两个口径);无工具时说明没有调用 |
|
|
140
|
-
| 表头 | 该列的含义(`#`
|
|
140
|
+
| 表头 | 该列的含义(`#` 一列用图标展示四种状态,并用色块说明两种行高亮的颜色) |
|
|
141
141
|
|
|
142
142
|
**行高亮:**
|
|
143
143
|
|
package/client/client.js
CHANGED
|
@@ -114,7 +114,9 @@ window.__ModuleLoader__.load({
|
|
|
114
114
|
hoursAgo: '{count} 小时前',
|
|
115
115
|
// Column-header hints. `{bolt}` / `{tools}` / `{compact}` are replaced by the glyphs
|
|
116
116
|
// themselves, which is why these are rendered by the tooltip component and not by title.
|
|
117
|
-
hintIndex:
|
|
117
|
+
hintIndex:
|
|
118
|
+
'行号:1–10 为已完成的最近记录,{bolt} 为模型输出中,{tools} 为工具调用中,{compact} 为压缩上下文中',
|
|
119
|
+
hintColour: '整行黄色表示缓存命中过低,蓝色表示这一步切换了模型',
|
|
118
120
|
hintTime: '请求发出的时刻(本地时间)',
|
|
119
121
|
hintTtft: '从发出到收到第一个 token 的耗时',
|
|
120
122
|
hintSpeed: '模型生成速度 = 输出 token ÷ 解码时长',
|
|
@@ -176,7 +178,9 @@ window.__ModuleLoader__.load({
|
|
|
176
178
|
secondsAgo: '{count}s ago',
|
|
177
179
|
minutesAgo: '{count}m ago',
|
|
178
180
|
hoursAgo: '{count}h ago',
|
|
179
|
-
hintIndex:
|
|
181
|
+
hintIndex:
|
|
182
|
+
'Row number: 1–10 are the most recent finished records; {bolt} is a model reply, {tools} is a tool call, {compact} is a context compaction',
|
|
183
|
+
hintColour: 'A yellow row means a low cache hit; a blue row means this step switched models',
|
|
180
184
|
hintTime: 'When the request was issued (local time)',
|
|
181
185
|
hintTtft: 'Time from issuing the request to receiving its first token',
|
|
182
186
|
hintSpeed: 'Generation speed = output tokens ÷ decode time',
|
|
@@ -639,6 +643,39 @@ window.__ModuleLoader__.load({
|
|
|
639
643
|
.dsh-rum-tip .dsh-rum-tip-icon {
|
|
640
644
|
color: var(--dsw-alias-brand-primary);
|
|
641
645
|
}
|
|
646
|
+
/*
|
|
647
|
+
* The index hint is two lines: what the glyphs mean, then what the row colours mean.
|
|
648
|
+
*
|
|
649
|
+
* The colour line leads with two swatches instead of naming the hues, so a reader matches a
|
|
650
|
+
* row against the legend by colour rather than by translating a word. The swatches take the
|
|
651
|
+
* same tokens the rows take, so the two can never disagreement.
|
|
652
|
+
*/
|
|
653
|
+
.dsh-rum-tip-body {
|
|
654
|
+
display: block;
|
|
655
|
+
}
|
|
656
|
+
.dsh-rum-tip-line {
|
|
657
|
+
display: block;
|
|
658
|
+
}
|
|
659
|
+
.dsh-rum-tip-line + .dsh-rum-tip-line {
|
|
660
|
+
margin-top: 5px;
|
|
661
|
+
}
|
|
662
|
+
.dsh-rum-tip-swatch {
|
|
663
|
+
display: inline-block;
|
|
664
|
+
width: 8px;
|
|
665
|
+
height: 8px;
|
|
666
|
+
border-radius: 2px;
|
|
667
|
+
margin-right: 3px;
|
|
668
|
+
vertical-align: 0;
|
|
669
|
+
}
|
|
670
|
+
.dsh-rum-tip-swatch + .dsh-rum-tip-swatch {
|
|
671
|
+
margin-left: 6px;
|
|
672
|
+
}
|
|
673
|
+
.dsh-rum-tip-swatch[data-hue="lowcache"] {
|
|
674
|
+
background: var(--dsw-alias-state-warn-primary, var(--dsw-alias-state-warn-label));
|
|
675
|
+
}
|
|
676
|
+
.dsh-rum-tip-swatch[data-hue="switched"] {
|
|
677
|
+
background: var(--dsw-alias-state-business-primary, var(--dsw-alias-brand-primary));
|
|
678
|
+
}
|
|
642
679
|
.dsh-rum-empty {
|
|
643
680
|
flex: 1 1 auto;
|
|
644
681
|
padding: 14px 6px 16px;
|
|
@@ -1938,7 +1975,23 @@ window.__ModuleLoader__.load({
|
|
|
1938
1975
|
else if (token === '{compact}') nodes.push(glyph(CompactionIcon))
|
|
1939
1976
|
else nodes.push(token)
|
|
1940
1977
|
}
|
|
1941
|
-
|
|
1978
|
+
/*
|
|
1979
|
+
* The colour legend is its own line, with the two highlights drawn as swatches rather than
|
|
1980
|
+
* named. A reader can then match a row to the legend by colour instead of translating a
|
|
1981
|
+
* word, and the swatches use the same tokens the rows do, so the two cannot drift.
|
|
1982
|
+
*/
|
|
1983
|
+
return h(
|
|
1984
|
+
'span',
|
|
1985
|
+
{ className: 'dsh-rum-tip-body' },
|
|
1986
|
+
h('span', { className: 'dsh-rum-tip-line' }, ...nodes),
|
|
1987
|
+
h(
|
|
1988
|
+
'span',
|
|
1989
|
+
{ className: 'dsh-rum-tip-line' },
|
|
1990
|
+
h('span', { className: 'dsh-rum-tip-swatch', 'data-hue': 'lowcache' }),
|
|
1991
|
+
h('span', { className: 'dsh-rum-tip-swatch', 'data-hue': 'switched' }),
|
|
1992
|
+
t('hintColour'),
|
|
1993
|
+
),
|
|
1994
|
+
)
|
|
1942
1995
|
}
|
|
1943
1996
|
|
|
1944
1997
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-recent-usage-metrics",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Geek level for the Performance & usage setting: a live reading of the newest request (first-token latency, speed, tokens, total, amortised) plus a drawer listing the last ten, all derived from the shipped Statistics view data",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|