feat: add profile filter in benchmark

This commit is contained in:
jialin
2026-03-16 14:48:46 +08:00
committed by jialin
parent b75c773879
commit 3f57cf21f7
3 changed files with 21 additions and 3 deletions
@@ -5,6 +5,7 @@ import { useIntl } from '@umijs/max';
import { Button, Input, Space } from 'antd';
import _ from 'lodash';
import React from 'react';
import { profileOptions } from '../config';
export interface RightActionsProps {
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
@@ -67,12 +68,29 @@ const RightActions: React.FC<RightActionsProps> = ({
allowClear
onChange={handleGPUChange}
></Input>
<BaseSelect
allowClear
placeholder={intl.formatMessage({
id: 'benchmark.table.filter.byProfile'
})}
style={{ width: 160 }}
options={profileOptions.map((item) => ({
label: intl.formatMessage({ id: item.label }),
value: item.value
}))}
onChange={(value, option) =>
handleQueryChange({
profile: value,
page: 1
})
}
></BaseSelect>
<BaseSelect
allowClear
placeholder={intl.formatMessage({
id: 'benchmark.table.filter.bymodel'
})}
style={{ width: 200 }}
style={{ width: 180 }}
options={modelOptions}
onChange={(value, option) =>
handleQueryChange({
@@ -32,7 +32,7 @@ const PercentileResult: React.FC = () => {
render: (value: number) => round(value, 2)
},
{
title: `${intl.formatMessage({ id: 'benchmark.detail.percentile.latency' })} (ms)`,
title: `${intl.formatMessage({ id: 'benchmark.detail.percentile.latency' })} (s)`,
dataIndex: 'request_latency',
render: (value: number) => round(value, 2)
},
@@ -143,7 +143,7 @@ const useColumnSettings = (options: {
title: renderTitle(
`${intl.formatMessage({ id: 'benchmark.detail.summary.latency' })}`,
{
subTitle: `${intl.formatMessage({ id: 'benchmark.table.avg' })} (ms)`
subTitle: `${intl.formatMessage({ id: 'benchmark.table.avg' })} (s)`
}
),
dataIndex: 'request_latency_mean',