mirror of https://github.com/Chocobozzz/PeerTube
Add "max requests number" information for requests iterations
parent
5abeec313f
commit
32e574750a
|
@ -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 }}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue