Skip to content

Commit 515e309

Browse files
committed
feat: log uncompressed data size in AxiosService before compression
1 parent 6624161 commit 515e309

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/common/axios/axios.service.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,17 @@ export class AxiosService {
9090
const nodeUrl = this.getNodeUrl(url, StartXrayCommand.url, port);
9191

9292
try {
93+
// TODO: Remove this log
94+
this.logger.log(
95+
`Uncompressed data size: ${prettyBytesUtil(JSON.stringify(data).length)}`,
96+
);
97+
9398
const ct = getTime();
9499

95100
const compressedData = await this.compressData(data);
96101

97102
this.logger.log(
98-
`Compressed data in: ${formatExecutionTime(ct)}, size: ${prettyBytesUtil(compressedData.length, false, 0, true)}`,
103+
`Compressed data in: ${formatExecutionTime(ct)}, size: ${prettyBytesUtil(compressedData.length)}`,
99104
);
100105

101106
const response = await this.axiosInstance.post<StartXrayCommand.Response>(

0 commit comments

Comments
 (0)