@miso.ai/server-sdk 0.6.5-beta.13 → 0.6.5-beta.15

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/cli/upload.js CHANGED
@@ -12,6 +12,10 @@ function build(yargs) {
12
12
  describe: 'Accept some lenient record schema',
13
13
  type: 'boolean',
14
14
  })
15
+ .option('requests-per-second', {
16
+ alias: ['rps'],
17
+ describe: 'How many requests to send per second',
18
+ })
15
19
  .option('records-per-request', {
16
20
  alias: ['rpr'],
17
21
  describe: 'How many records to send in a request',
@@ -47,6 +51,7 @@ const run = type => async ({
47
51
  param: params,
48
52
  ['dry-run']: dryRun,
49
53
  lenient,
54
+ ['requests-per-second']: requestsPerSecond,
50
55
  ['records-per-request']: recordsPerRequest,
51
56
  ['bytes-per-request']: bytesPerRequest,
52
57
  ['bytes-per-second']: bytesPerSecond,
@@ -71,6 +76,7 @@ const run = type => async ({
71
76
  dryRun,
72
77
  params,
73
78
  heartbeatInterval: logFormat === logger.FORMAT.PROGRESS ? 250 : false,
79
+ requestsPerSecond,
74
80
  recordsPerRequest,
75
81
  bytesPerRequest,
76
82
  bytesPerSecond,
package/package.json CHANGED
@@ -16,12 +16,12 @@
16
16
  "simonpai <simon.pai@askmiso.com>"
17
17
  ],
18
18
  "dependencies": {
19
- "@miso.ai/server-commons": "0.6.5-beta.13",
19
+ "@miso.ai/server-commons": "0.6.5-beta.15",
20
20
  "axios": "^1.6.2",
21
21
  "axios-retry": "^4.5.0",
22
22
  "dotenv": "^16.0.1",
23
23
  "split2": "^4.1.0",
24
24
  "yargs": "^17.5.1"
25
25
  },
26
- "version": "0.6.5-beta.13"
26
+ "version": "0.6.5-beta.15"
27
27
  }
@@ -1,10 +1,17 @@
1
1
  import { sink, trimObj } from '@miso.ai/server-commons';
2
2
  import ServiceStats from './service-stats.js';
3
3
 
4
+ function shimOptions({ requestsPerSecond, ...options }) {
5
+ return {
6
+ ...options,
7
+ writesPerSecond: requestsPerSecond,
8
+ };
9
+ }
10
+
4
11
  export default class ApiSink extends sink.BpsSink {
5
12
 
6
13
  constructor(client, options) {
7
- super(options);
14
+ super(shimOptions(options));
8
15
  this._client = client;
9
16
  this._serviceStats = new ServiceStats();
10
17
  }
@@ -15,6 +15,7 @@ export default class UploadStream extends stream.BufferedWriteStream {
15
15
  dryRun,
16
16
  params,
17
17
  experimentId,
18
+ requestsPerSecond,
18
19
  recordsPerSecond,
19
20
  bytesPerSecond,
20
21
  // buffer
@@ -38,6 +39,7 @@ export default class UploadStream extends stream.BufferedWriteStream {
38
39
  dryRun,
39
40
  params,
40
41
  experimentId,
42
+ requestsPerSecond,
41
43
  recordsPerSecond,
42
44
  bytesPerSecond,
43
45
  });
package/src/version.js CHANGED
@@ -1 +1 @@
1
- export default '0.6.5-beta.13';
1
+ export default '0.6.5-beta.15';