pinokiod 3.6.29 → 3.6.31
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/kernel/api/index.js +8 -2
- package/kernel/index.js +2 -0
- package/kernel/sysinfo.js +22 -12
- package/package.json +1 -1
package/kernel/api/index.js
CHANGED
|
@@ -568,9 +568,13 @@ class Api {
|
|
|
568
568
|
}
|
|
569
569
|
async step (request, rawrpc, input, i, total, args) {
|
|
570
570
|
|
|
571
|
-
await this.init
|
|
571
|
+
await Promise.all([this.init, this.kernel.update_sysinfo])
|
|
572
572
|
|
|
573
|
-
await this.
|
|
573
|
+
// await this.init()
|
|
574
|
+
//
|
|
575
|
+
// console.time("api.update_sysinfo")
|
|
576
|
+
// await this.kernel.update_sysinfo()
|
|
577
|
+
// console.timeEnd("api.update_sysinfo")
|
|
574
578
|
|
|
575
579
|
// clear global regular expression object RegExp.lastMatch (memory leak prevention)
|
|
576
580
|
let r = /\s*/g.exec("");
|
|
@@ -1163,7 +1167,9 @@ class Api {
|
|
|
1163
1167
|
// this.kernel.keys = (await this.loader.load(keypath)).resolved
|
|
1164
1168
|
|
|
1165
1169
|
// init shell before running just to make sure the environment variables are fresh
|
|
1170
|
+
console.time("shell.init")
|
|
1166
1171
|
await this.kernel.shell.init()
|
|
1172
|
+
console.timeEnd("shell.init")
|
|
1167
1173
|
|
|
1168
1174
|
if (request.uri){
|
|
1169
1175
|
this.counter++;
|
package/kernel/index.js
CHANGED
package/kernel/sysinfo.js
CHANGED
|
@@ -5,24 +5,34 @@ class Sysinfo {
|
|
|
5
5
|
async init(kernel) {
|
|
6
6
|
this.kernel = kernel
|
|
7
7
|
this.info = {}
|
|
8
|
-
await this.static
|
|
9
|
-
await this.
|
|
8
|
+
await Promise.all([this.static, this.refresh])
|
|
9
|
+
// await this.static()
|
|
10
|
+
// await this.refresh()
|
|
10
11
|
}
|
|
11
12
|
async static() {
|
|
12
|
-
await this.gpus
|
|
13
|
-
await this.
|
|
14
|
-
await this.
|
|
15
|
-
await this.
|
|
16
|
-
await this.
|
|
17
|
-
await this.
|
|
13
|
+
await Promise.all([this.gpus, this.system, this.cpu, this.os, this.audio, this.env])
|
|
14
|
+
// await this.gpus()
|
|
15
|
+
// await this.system()
|
|
16
|
+
// await this.cpu()
|
|
17
|
+
// await this.os()
|
|
18
|
+
// await this.audio()
|
|
19
|
+
// await this.env()
|
|
20
|
+
|
|
21
|
+
|
|
18
22
|
// await this.disk()
|
|
19
23
|
}
|
|
20
24
|
async refresh() {
|
|
21
25
|
// await this.time()
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
await this.proc
|
|
25
|
-
await this.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
await Promise.all([this.memory, this.battery, this.proc, this.bluetooth])
|
|
29
|
+
// await this.memory()
|
|
30
|
+
// await this.battery()
|
|
31
|
+
// await this.proc()
|
|
32
|
+
// await this.bluetooth()
|
|
33
|
+
//
|
|
34
|
+
|
|
35
|
+
|
|
26
36
|
// await this.net()
|
|
27
37
|
}
|
|
28
38
|
async gpus() {
|