modified: apps/state.js
This commit is contained in:
@@ -52,8 +52,11 @@ export class example extends plugin {
|
||||
let [ram_leftCircle, ram_rightCircle] = ram
|
||||
//最大mhz
|
||||
// let maxspeed = CPU.getmaxspeed()
|
||||
let maxspeed = await si.cpuCurrentSpeed()
|
||||
//核心
|
||||
// let hx = os.cpus()
|
||||
let hx = os.cpus()
|
||||
//cpu制造者
|
||||
let cpumodel = hx[0]?.model.slice(0, hx[0]?.model.indexOf(" ")) || ""
|
||||
//群数
|
||||
let group_quantity = Array.from(Bot.gl.values()).length
|
||||
//好友数
|
||||
@@ -92,7 +95,6 @@ export class example extends plugin {
|
||||
let network = (await si.networkStats())[0]
|
||||
network.rx_sec = CPU.getfilesize(network.rx_sec, false)
|
||||
network.tx_sec = CPU.getfilesize(network.tx_sec, false)
|
||||
|
||||
//渲染数据
|
||||
let data = {
|
||||
//路径
|
||||
@@ -120,11 +122,11 @@ export class example extends plugin {
|
||||
cpu_rightCircle,
|
||||
cpu_info: parseInt(cpu_info * 100) + "%",
|
||||
//核心
|
||||
// hx: hx.length + "核",
|
||||
// hxmodel: hx[0]?.model.slice(0, 3) || "",
|
||||
cpudata: await si.cpu(),
|
||||
hx: hx.length + "核",
|
||||
cpumodel,
|
||||
// cpudata: await si.cpu(),
|
||||
//最大MHZ
|
||||
// maxspeed,
|
||||
maxspeed,
|
||||
//系统
|
||||
osinfo,
|
||||
//内存使用率
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
</div>
|
||||
<article>
|
||||
<p>CPU</p>
|
||||
<p>{{cpudata?.manufacturer}} {{cpudata?.cores + '核'}} {{osinfo.arch}}</p>
|
||||
<p>平均{{cpudata?.speed}}GHz</p>
|
||||
<p>最大{{cpudata?.speedMax}}GHz</p>
|
||||
<p>{{cpumodel}} {{hx}} {{osinfo.arch}}</p>
|
||||
<p>平均{{maxspeed.avg}}GHz</p>
|
||||
<p>最大{{maxspeed.max}}GHz</p>
|
||||
</article>
|
||||
</li>
|
||||
<li class="li">
|
||||
|
||||
Reference in New Issue
Block a user