Skip to content

Commit d31ee4d

Browse files
committed
fix: speedMetrics -> streamMetrics
1 parent e7d2685 commit d31ee4d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/containers/Tenant/Query/QueryResult/components/ResultSetsViewer/ResultSetsViewer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ export function ResultSetsViewer(props: ResultSetsViewerProps) {
5656
{currentResult?.result ? (
5757
<Text color="secondary" variant="body-2" className={b('row-count')}>
5858
{`(${currentResult?.result.length}${
59-
currentResult.speedMetrics?.rowsPerSecond
60-
? `, ${currentResult.speedMetrics.rowsPerSecond.toFixed(0)} rows/s`
59+
currentResult.streamMetrics?.rowsPerSecond
60+
? `, ${currentResult.streamMetrics.rowsPerSecond.toFixed(0)} rows/s`
6161
: ''
6262
})`}
6363
</Text>

src/store/reducers/query/streamingReducers.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type {PayloadAction} from '@reduxjs/toolkit';
22

3-
import type {SpeedMetrics} from '../../../types/store/query';
3+
import type {StreamMetrics} from '../../../types/store/query';
44
import type {
55
QueryResponseChunk,
66
SessionChunk,
@@ -58,7 +58,7 @@ export const setStreamQueryResponse = (
5858
}
5959
};
6060

61-
const updateSpeedMetrics = (metrics: SpeedMetrics, totalNewRows: number) => {
61+
const updateStreamMetrics = (metrics: StreamMetrics, totalNewRows: number) => {
6262
const currentTime = Date.now();
6363
const WINDOW_SIZE = 5000; // 5 seconds in milliseconds
6464

@@ -85,7 +85,7 @@ const getEmptyResultSet = () => {
8585
columns: [],
8686
result: [],
8787
truncated: false,
88-
speedMetrics: {
88+
streamMetrics: {
8989
rowsPerSecond: 0,
9090
lastUpdateTime: Date.now(),
9191
recentChunks: [],
@@ -150,8 +150,8 @@ export const addStreamingChunks = (state: QueryState, action: PayloadAction<Stre
150150
});
151151
resultSet.truncated = chunk.result.truncated;
152152

153-
if (resultSet.speedMetrics) {
154-
updateSpeedMetrics(resultSet.speedMetrics, totalNewRows);
153+
if (resultSet.streamMetrics) {
154+
updateStreamMetrics(resultSet.streamMetrics, totalNewRows);
155155
}
156156
}
157157
};

src/types/store/query.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import type {
2020
} from '../api/query';
2121
import type {ValueOf} from '../common';
2222

23-
export interface SpeedMetrics {
23+
export interface StreamMetrics {
2424
rowsPerSecond: number;
2525
lastUpdateTime: number;
2626
recentChunks: Array<{
@@ -33,7 +33,7 @@ export interface ParsedResultSet {
3333
columns?: ColumnType[];
3434
result?: KeyValueRow[];
3535
truncated?: boolean;
36-
speedMetrics?: SpeedMetrics;
36+
streamMetrics?: StreamMetrics;
3737
}
3838

3939
export interface IQueryResult {

0 commit comments

Comments
 (0)