-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from boostcampwm-2024/be-feat#135
[BE] TOP5 응답 속도 API
- Loading branch information
Showing
9 changed files
with
199 additions
and
180 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
backend/console-server/src/log/dto/get-speed-rank-response.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Exclude, Expose, Type } from 'class-transformer'; | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
|
||
export class ProjectSpeedData { | ||
@ApiProperty({ | ||
example: 'watchducks', | ||
description: '해당 프로젝트명', | ||
}) | ||
@Expose() | ||
projectName: string; | ||
|
||
@ApiProperty({ | ||
example: 123.45, | ||
description: '평균 응답 소요 시간 (ms).', | ||
}) | ||
@Expose() | ||
@Type(() => Number) | ||
avgResponseTime: number; | ||
} | ||
|
||
export class GetSpeedRankResponseDto { | ||
@ApiProperty({ | ||
type: [ProjectSpeedData], | ||
description: '프로젝트별 응답 속도 배열', | ||
}) | ||
@Type(() => ProjectSpeedData) | ||
projectSpeedRank: ProjectSpeedData[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { Type } from 'class-transformer'; | ||
import { IsNumber } from 'class-validator'; | ||
|
||
export class GetSpeedRankDto { | ||
@IsNumber() | ||
@Type(() => Number) | ||
@ApiProperty({ | ||
description: '기수', | ||
example: 5, | ||
required: true, | ||
}) | ||
generation: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.