feat: add profile filter in benchmark
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user