Add "max requests number" information for requests iterations
authorChocobozzz <florian.bigard@gmail.com>
Sat, 1 Oct 2016 13:43:42 +0000 (15:43 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Sat, 1 Oct 2016 13:45:15 +0000 (15:45 +0200)
client/src/app/admin/requests/request-stats/request-stats.component.html
client/src/app/admin/requests/shared/request-stats.model.ts
server/controllers/api/v1/requests.js

index 1b90100e764e20a5301557559329b4a5c884d15f..b5ac59a9aa57efed6dd33cf6f869290204f86402 100644 (file)
     {{ 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 }}
index dfa956f10a62d53fda446220dc4b067916415ffe..766e808360294f5ac84b9d379a3bafe7705412cc 100644 (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;
index 9610e5cd671a677b4308ac3286d3b3ffcaf0c861..97616424d0e24d87996be0c0f3c30e417fd82709 100644 (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
     })