Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3eeb38b

Browse files
authored
Merge pull request#319 from bittcrafter/dev/0.17.0
fix(metrics): correct CPU load calculation formula
2 parentsf608d76 +8b0c86b commit3eeb38b

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

‎README-CN.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
- TLS支持;
4949
- WebSocket支持;
5050
- WebSocket-TLS支持;
51+
- MQTT over QUIC支持;
5152
- 内置可扩展功能;
5253
- 支持扩展插件;
5354
- 指标监控;

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ and mobile applications that can handle millions of concurrent clients on a sing
5050
- TLS support;
5151
- WebSocket support;
5252
- WebSocket-TLS support;
53+
- MQTT over QUIC support;
5354
- Built-in extensible components;
5455
- Extensible plug-in support;
5556
- Metrics & Stats;

‎rmqtt/src/node.rs‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,9 @@ impl Node {
230230
.map(|cpuload_aggr|{
231231
let aggregate1 =
232232
cpuload_aggr.user + cpuload_aggr.nice + cpuload_aggr.system + cpuload_aggr.interrupt;
233-
let aggregate2 = aggregate1 + cpuload_aggr.idle;
234-
if aggregate2 <=0.0{
235-
1.0
236-
}else{
237-
aggregate2
238-
};
239-
aggregate1 / aggregate2*10_000.0
233+
aggregate1*100.0
240234
})
241235
.unwrap_or_default();
242-
243236
self.cpuload.store(cpuloadasi64,Ordering::SeqCst);
244237
}
245238
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp