Add "max requests number" information for requests iterations

pull/10/merge
Chocobozzz 2016-10-01 15:43:42 +02:00
parent 5abeec313f
commit 32e574750a
3 changed files with 10 additions and 1 deletions

View File

@ -11,6 +11,11 @@
{{ stats.remainingSeconds }}
</div>
<div>
<span class="label-description">Maximum number of requests per interval:</span>
{{ stats.maxRequestsInParallel }}
</div>
<div>
<span class="label-description">Remaining requests:</span>
{{ stats.requests.length }}

View File

@ -4,15 +4,18 @@ export interface Request {
}
export class RequestStats {
maxRequestsInParallel: number;
milliSecondsInterval: number;
remainingMilliSeconds: number;
remainingMilliSeconds: number;
requests: Request[];
constructor(hash: {
maxRequestsInParallel: number,
milliSecondsInterval: number,
remainingMilliSeconds: number,
requests: Request[];
}) {
this.maxRequestsInParallel = hash.maxRequestsInParallel;
this.milliSecondsInterval = hash.milliSecondsInterval;
this.remainingMilliSeconds = hash.remainingMilliSeconds;
this.requests = hash.requests;

View File

@ -30,6 +30,7 @@ function getStatsRequests (req, res, next) {
return res.json({
requests: requests,
maxRequestsInParallel: constants.REQUESTS_IN_PARALLEL,
remainingMilliSeconds: Request.remainingMilliSeconds(),
milliSecondsInterval: constants.REQUESTS_INTERVAL
})