topbit 3.0.8 → 3.1.1

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/src/topbit.js CHANGED
@@ -164,7 +164,7 @@ class Topbit {
164
164
  * - maxFormLength 在multipart/form-data类型提交数据时,单个form项的最大值,默认为1000000字节。
165
165
  * - errorHandle 收集错误并处理的函数,默认是输出错误信息,接收参数为两个,第一个是错误信息,第二个是错误的名字描述。
166
166
  * - ignoreSlash 忽略末尾的/,默认为true。
167
- * - maxLoadRate 在自动创建子进程平衡负载模式,最大子进程负载率限制:25 ~ 98表示百分比。
167
+ * - maxLoadRate 在自动创建子进程平衡负载模式,最大子进程负载率限制:0.150.98
168
168
  * - streamTimeout http2Stream超时,若不设置,默认采用timeout的设置。
169
169
  */
170
170
  constructor(options={}) {
@@ -272,7 +272,7 @@ class Topbit {
272
272
 
273
273
  requestTimeout: 65_000,
274
274
 
275
- maxLoadRate: 75
275
+ maxLoadRate: 0.75
276
276
  };
277
277
 
278
278
  this.whoami = 'topbit';
@@ -343,11 +343,11 @@ class Topbit {
343
343
  break;
344
344
 
345
345
  case 'monitorTimeSlice':
346
- optionsCheck(k, options[k], this.config, {type: 'number', min: 5, max: 5000});
346
+ optionsCheck(k, options[k], this.config, {type: 'number', min: 5, max: 10000});
347
347
  break;
348
-
348
+
349
349
  case 'maxLoadRate':
350
- optionsCheck(k, options[k], this.config, {type: 'number', min: 25, max: 98});
350
+ optionsCheck(k, options[k], this.config, {type: 'number', min: 0.15, max: 0.98});
351
351
  break;
352
352
 
353
353
  case 'maxFiles':
@@ -364,13 +364,13 @@ class Topbit {
364
364
  case 'logHistory':
365
365
  optionsCheck(k, options[k], this.config, {type: 'number', min: 1});
366
366
  break;
367
-
367
+
368
368
  case 'logType':
369
369
  optionsCheck(k, options[k], this.config, {list: ['stdio','file', '']});
370
370
  break;
371
371
 
372
372
  case 'loadInfoType':
373
- optionsCheck(k, options[k], this.config, {list: ['--null', 'text', 'json', 'orgjson']});
373
+ optionsCheck(k, options[k], this.config, {list: [null, 'null', 'text', 'obj', 'orgobj']});
374
374
  break;
375
375
 
376
376
  case 'loadMonitor':
@@ -1110,7 +1110,7 @@ class Topbit {
1110
1110
  total: 0
1111
1111
  },
1112
1112
  cpu: {user:0, system:0},
1113
- cputm : 1000
1113
+ cputm : 1000000
1114
1114
  };
1115
1115
 
1116
1116
  });
@@ -1,4 +1,4 @@
1
- const titbit = require('../lib/titbit');
1
+ const titbit = require('../src/topbit');
2
2
 
3
3
  let app = new titbit();
4
4
 
@@ -1,4 +1,4 @@
1
- const titbit = require('../lib/titbit.js');
1
+ const titbit = require('../src/topbit.js');
2
2
 
3
3
  var app = new titbit();
4
4