]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/admin/requests/shared/request-stats.model.ts
First version with PostgreSQL
[github/Chocobozzz/PeerTube.git] / client / src / app / admin / requests / shared / request-stats.model.ts
CommitLineData
bed3143e
C
1export interface Request {
2 request: any;
3 to: any;
4}
5
6export class RequestStats {
32e57475 7 maxRequestsInParallel: number;
eb4f957e 8 milliSecondsInterval: number;
32e57475 9 remainingMilliSeconds: number;
feb4bdfd 10 totalRequests: number;
bed3143e
C
11
12 constructor(hash: {
32e57475 13 maxRequestsInParallel: number,
bed3143e
C
14 milliSecondsInterval: number,
15 remainingMilliSeconds: number,
feb4bdfd 16 totalRequests: number;
bed3143e 17 }) {
32e57475 18 this.maxRequestsInParallel = hash.maxRequestsInParallel;
bed3143e
C
19 this.milliSecondsInterval = hash.milliSecondsInterval;
20 this.remainingMilliSeconds = hash.remainingMilliSeconds;
feb4bdfd 21 this.totalRequests = hash.totalRequests;
bed3143e
C
22 }
23
24 get remainingSeconds() {
25 return Math.floor(this.remainingMilliSeconds / 1000);
26 }
27
28 get secondsInterval() {
29 return Math.floor(this.milliSecondsInterval / 1000);
30 }
31
eb4f957e 32}