Add "max requests number" information for requests iterations
This commit is contained in:
parent
5abeec313f
commit
32e574750a
|
@ -11,6 +11,11 @@
|
||||||
{{ stats.remainingSeconds }}
|
{{ stats.remainingSeconds }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span class="label-description">Maximum number of requests per interval:</span>
|
||||||
|
{{ stats.maxRequestsInParallel }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<span class="label-description">Remaining requests:</span>
|
<span class="label-description">Remaining requests:</span>
|
||||||
{{ stats.requests.length }}
|
{{ stats.requests.length }}
|
||||||
|
|
|
@ -4,15 +4,18 @@ export interface Request {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class RequestStats {
|
export class RequestStats {
|
||||||
|
maxRequestsInParallel: number;
|
||||||
milliSecondsInterval: number;
|
milliSecondsInterval: number;
|
||||||
remainingMilliSeconds: number;
|
remainingMilliSeconds: number;
|
||||||
requests: Request[];
|
requests: Request[];
|
||||||
|
|
||||||
constructor(hash: {
|
constructor(hash: {
|
||||||
|
maxRequestsInParallel: number,
|
||||||
milliSecondsInterval: number,
|
milliSecondsInterval: number,
|
||||||
remainingMilliSeconds: number,
|
remainingMilliSeconds: number,
|
||||||
requests: Request[];
|
requests: Request[];
|
||||||
}) {
|
}) {
|
||||||
|
this.maxRequestsInParallel = hash.maxRequestsInParallel;
|
||||||
this.milliSecondsInterval = hash.milliSecondsInterval;
|
this.milliSecondsInterval = hash.milliSecondsInterval;
|
||||||
this.remainingMilliSeconds = hash.remainingMilliSeconds;
|
this.remainingMilliSeconds = hash.remainingMilliSeconds;
|
||||||
this.requests = hash.requests;
|
this.requests = hash.requests;
|
||||||
|
|
|
@ -30,6 +30,7 @@ function getStatsRequests (req, res, next) {
|
||||||
|
|
||||||
return res.json({
|
return res.json({
|
||||||
requests: requests,
|
requests: requests,
|
||||||
|
maxRequestsInParallel: constants.REQUESTS_IN_PARALLEL,
|
||||||
remainingMilliSeconds: Request.remainingMilliSeconds(),
|
remainingMilliSeconds: Request.remainingMilliSeconds(),
|
||||||
milliSecondsInterval: constants.REQUESTS_INTERVAL
|
milliSecondsInterval: constants.REQUESTS_INTERVAL
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue