dsh-flash-mem-mon 0.1.4 → 0.1.7
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/README.md +39 -38
- package/README.zh-CN.md +38 -38
- package/cordis.patch.yml +11 -11
- package/dist/index.js +391 -372
- package/dist/pure.js +66 -0
- package/lib/client.js +2433 -2071
- package/package.json +25 -16
package/README.md
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
# dsh-flash-mem-mon
|
|
2
|
-
|
|
3
|
-
Memory monitor provider for [
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
dsh plugin --profile <profile> add dsh-flash-mem-mon
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Requires `
|
|
12
|
-
|
|
13
|
-
## Configuration
|
|
14
|
-
|
|
15
|
-
All settings are live-editable (volatile) and take effect immediately:
|
|
16
|
-
|
|
17
|
-
| Setting | Default | Description |
|
|
18
|
-
|---|---|---|
|
|
19
|
-
| `memThresholdInfo` | 256 MB | RSS info threshold |
|
|
20
|
-
| `memThresholdWarning` | 512 MB | RSS warning threshold |
|
|
21
|
-
| `memThresholdError` | 1024 MB | RSS error threshold |
|
|
22
|
-
| `memThresholdCritical` | 1536 MB | RSS critical threshold |
|
|
23
|
-
| `memPollBase` | 30000 ms | Base polling interval |
|
|
24
|
-
| `memPollMin` | 2000 ms | Minimum polling interval |
|
|
25
|
-
| `gcThresholdInfo` | 2 /min | Major GC info threshold |
|
|
26
|
-
| `gcThresholdWarning` | 5 /min | Major GC warning threshold |
|
|
27
|
-
| `gcThresholdError` | 10 /min | Major GC error threshold |
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- **
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
# dsh-flash-mem-mon
|
|
2
|
+
|
|
3
|
+
Memory monitor provider for [dsh-flash](https://github.com/tcgbp/dsh-flash) — registers a host-memory-alert provider (RSS absolute thresholds, RSS growth rate, Major GC frequency) via `ctx.get('dockFlashAlerts')` and exposes `/memory-trend` for trend sparklines.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
dsh plugin --profile <profile> add dsh-flash-mem-mon
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires `dsh-flash >=1.0.0` (provides `dockFlashAlerts` and `quickControl` services).
|
|
12
|
+
|
|
13
|
+
## Configuration
|
|
14
|
+
|
|
15
|
+
All settings are live-editable (volatile) and take effect immediately:
|
|
16
|
+
|
|
17
|
+
| Setting | Default | Description |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| `memThresholdInfo` | 256 MB | RSS info threshold |
|
|
20
|
+
| `memThresholdWarning` | 512 MB | RSS warning threshold |
|
|
21
|
+
| `memThresholdError` | 1024 MB | RSS error threshold |
|
|
22
|
+
| `memThresholdCritical` | 1536 MB | RSS critical threshold |
|
|
23
|
+
| `memPollBase` | 30000 ms | Base polling interval |
|
|
24
|
+
| `memPollMin` | 2000 ms | Minimum polling interval |
|
|
25
|
+
| `gcThresholdInfo` | 2 /min | Major GC info threshold |
|
|
26
|
+
| `gcThresholdWarning` | 5 /min | Major GC warning threshold |
|
|
27
|
+
| `gcThresholdError` | 10 /min | Major GC error threshold |
|
|
28
|
+
| `memGrowthAlertPerMin` | 1 MB/min | RSS growth-rate (linear-regression slope) alert threshold, applied with trend = up |
|
|
29
|
+
|
|
30
|
+
## Architecture
|
|
31
|
+
|
|
32
|
+
This is a **companion plugin** following the same two-half pattern as `dsh-flash-net-mon`:
|
|
33
|
+
|
|
34
|
+
- **Host half** (`src/index.ts` → tsc → `dist/index.js`): Memory trend ring buffer, GC observer, `/memory-trend` HTTP route
|
|
35
|
+
- **Client half** (`lib/client.js`): Alert provider, enable toggle, config modal with sparkline, i18n via DSH's `locale` service
|
|
36
|
+
|
|
37
|
+
## License
|
|
38
|
+
|
|
39
|
+
Apache-2.0
|
package/README.zh-CN.md
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
# dsh-flash-mem-mon
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## 安装
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
dsh plugin --profile <profile> add dsh-flash-mem-mon
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
需要 `
|
|
12
|
-
|
|
13
|
-
## 配置
|
|
14
|
-
|
|
15
|
-
所有设置均支持热更新(volatile),修改后立即生效:
|
|
16
|
-
|
|
17
|
-
| 设置 | 默认值 | 说明 |
|
|
18
|
-
|---|---|---|
|
|
19
|
-
| `memThresholdInfo` | 256 MB | RSS 信息阈值 |
|
|
20
|
-
| `memThresholdWarning` | 512 MB | RSS 警告阈值 |
|
|
21
|
-
| `memThresholdError` | 1024 MB | RSS 错误阈值 |
|
|
22
|
-
| `memThresholdCritical` | 1536 MB | RSS 严重阈值 |
|
|
23
|
-
| `memPollBase` | 30000 ms | 基础轮询间隔 |
|
|
24
|
-
| `memPollMin` | 2000 ms | 最小轮询间隔 |
|
|
25
|
-
| `gcThresholdInfo` | 2 /min | Major GC 信息阈值 |
|
|
26
|
-
| `gcThresholdWarning` | 5 /min | Major GC 警告阈值 |
|
|
27
|
-
| `gcThresholdError` | 10 /min | Major GC 错误阈值 |
|
|
28
|
-
|
|
29
|
-
## 架构
|
|
30
|
-
|
|
31
|
-
本插件为 **伴随插件**,遵循与 `dsh-flash-net-mon` 相同的双半模式:
|
|
32
|
-
|
|
33
|
-
- **宿主端** (`src/index.ts` → tsc → `dist/index.js`):内存趋势环形缓冲区、GC 观察器、`/memory-trend` HTTP 路由
|
|
34
|
-
- **客户端** (`lib/client.js`)
|
|
35
|
-
|
|
36
|
-
## 许可证
|
|
37
|
-
|
|
38
|
-
Apache-2.0
|
|
1
|
+
# dsh-flash-mem-mon
|
|
2
|
+
|
|
3
|
+
dsh-flash 的内存监控提供器 — 通过 `ctx.get('dockFlashAlerts')` 注册主机内存告警提供器(RSS 绝对阈值、RSS 增长率、Major GC 频率),并暴露 `/memory-trend` 路由用于趋势图。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
dsh plugin --profile <profile> add dsh-flash-mem-mon
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
需要 `dsh-flash >=1.0.0`(提供 `dockFlashAlerts` 和 `quickControl` 服务)。
|
|
12
|
+
|
|
13
|
+
## 配置
|
|
14
|
+
|
|
15
|
+
所有设置均支持热更新(volatile),修改后立即生效:
|
|
16
|
+
|
|
17
|
+
| 设置 | 默认值 | 说明 |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| `memThresholdInfo` | 256 MB | RSS 信息阈值 |
|
|
20
|
+
| `memThresholdWarning` | 512 MB | RSS 警告阈值 |
|
|
21
|
+
| `memThresholdError` | 1024 MB | RSS 错误阈值 |
|
|
22
|
+
| `memThresholdCritical` | 1536 MB | RSS 严重阈值 |
|
|
23
|
+
| `memPollBase` | 30000 ms | 基础轮询间隔 |
|
|
24
|
+
| `memPollMin` | 2000 ms | 最小轮询间隔 |
|
|
25
|
+
| `gcThresholdInfo` | 2 /min | Major GC 信息阈值 |
|
|
26
|
+
| `gcThresholdWarning` | 5 /min | Major GC 警告阈值 |
|
|
27
|
+
| `gcThresholdError` | 10 /min | Major GC 错误阈值 |
|
|
28
|
+
|
|
29
|
+
## 架构
|
|
30
|
+
|
|
31
|
+
本插件为 **伴随插件**,遵循与 `dsh-flash-net-mon` 相同的双半模式:
|
|
32
|
+
|
|
33
|
+
- **宿主端** (`src/index.ts` → tsc → `dist/index.js`):内存趋势环形缓冲区、GC 观察器、`/memory-trend` HTTP 路由
|
|
34
|
+
- **客户端** (`lib/client.js`):告警提供器、启用开关、带趋势图的配置弹窗、复用 DSH 官方 `locale` 服务的国际化
|
|
35
|
+
|
|
36
|
+
## 许可证
|
|
37
|
+
|
|
38
|
+
Apache-2.0
|
package/cordis.patch.yml
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# dsh-flash-mem-mon bundle layer — registers the HOST half into a profile.
|
|
2
|
-
#
|
|
3
|
-
# The BROWSER half needs no row here: the module loader auto-discovers the
|
|
4
|
-
# client bundle from package.json `exports["./client"]` + `dsh.client` and
|
|
5
|
-
# serves it at /plugins/<pkg>/client.js.
|
|
6
|
-
#
|
|
7
|
-
# PITFALL: `name` is a PACKAGE NAME (resolved via the profile's node_modules),
|
|
8
|
-
# NOT a relative path.
|
|
9
|
-
- insert:
|
|
10
|
-
- id: dsh-flash-mem-mon
|
|
11
|
-
name: dsh-flash-mem-mon
|
|
1
|
+
# dsh-flash-mem-mon bundle layer — registers the HOST half into a profile.
|
|
2
|
+
#
|
|
3
|
+
# The BROWSER half needs no row here: the module loader auto-discovers the
|
|
4
|
+
# client bundle from package.json `exports["./client"]` + `dsh.client` and
|
|
5
|
+
# serves it at /plugins/<pkg>/client.js.
|
|
6
|
+
#
|
|
7
|
+
# PITFALL: `name` is a PACKAGE NAME (resolved via the profile's node_modules),
|
|
8
|
+
# NOT a relative path.
|
|
9
|
+
- insert:
|
|
10
|
+
- id: dsh-flash-mem-mon
|
|
11
|
+
name: dsh-flash-mem-mon
|