pinokiod 3.15.19 → 3.15.20
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/procs.js +8 -4
- package/package.json +1 -1
package/kernel/procs.js
CHANGED
|
@@ -46,6 +46,7 @@ class Procs {
|
|
|
46
46
|
let pids = new Set()
|
|
47
47
|
let s = stdout.trim()
|
|
48
48
|
const lines = s.split('\n');
|
|
49
|
+
console.time("###### Line parsing")
|
|
49
50
|
for(let line of lines) {
|
|
50
51
|
if (isWin) {
|
|
51
52
|
// Skip headers
|
|
@@ -71,8 +72,8 @@ class Procs {
|
|
|
71
72
|
ip = localAddress
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
let isHttp = await this.isHttp(ip)
|
|
75
|
-
if (!isHttp) continue
|
|
75
|
+
// let isHttp = await this.isHttp(ip)
|
|
76
|
+
// if (!isHttp) continue
|
|
76
77
|
|
|
77
78
|
|
|
78
79
|
if (pids.has(pid+"/"+port)) continue;
|
|
@@ -105,8 +106,8 @@ class Procs {
|
|
|
105
106
|
ip = localAddress
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
let isHttp = await this.isHttp(ip)
|
|
109
|
-
if (!isHttp) continue;
|
|
109
|
+
// let isHttp = await this.isHttp(ip)
|
|
110
|
+
// if (!isHttp) continue;
|
|
110
111
|
|
|
111
112
|
//const portMatch = line.match(/:(\d+)\s/);
|
|
112
113
|
//const port = portMatch?.[1];
|
|
@@ -118,11 +119,14 @@ class Procs {
|
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
}
|
|
122
|
+
console.timeEnd("###### Line parsing")
|
|
123
|
+
console.time("########## http_check")
|
|
121
124
|
const http_check = results.map(({ ip }) => {
|
|
122
125
|
return limit(() => {
|
|
123
126
|
return this.isHttp(ip)
|
|
124
127
|
})
|
|
125
128
|
})
|
|
129
|
+
console.timeEnd("########## http_check")
|
|
126
130
|
let filtered = []
|
|
127
131
|
for(let i=0; i<http_check.length; i++) {
|
|
128
132
|
if (http_check[i]) {
|