[Profiling] Fix ordering of CPU incl. subfunctions in TopN Functions (#145013)

Kibana client fetches all functions from the server.
Kibana client only shows the Top 100 functions, dependent on column sort
order.

Fixes https://github.com/elastic/prodfiler/issues/2723
This commit is contained in:
Tim Rühsen 2022-11-11 01:53:15 +01:00 committed by GitHub
parent 0eea0a468a
commit e58e6976fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -49,7 +49,7 @@ export function FunctionsView({ children }: { children: React.ReactElement }) {
timeFrom: new Date(timeRange.start).getTime() / 1000,
timeTo: new Date(timeRange.end).getTime() / 1000,
startIndex: 0,
endIndex: 1000,
endIndex: 100000,
kuery,
});
},
@ -66,7 +66,7 @@ export function FunctionsView({ children }: { children: React.ReactElement }) {
timeFrom: new Date(comparisonTimeRange.start).getTime() / 1000,
timeTo: new Date(comparisonTimeRange.end).getTime() / 1000,
startIndex: 0,
endIndex: 1000,
endIndex: 100000,
kuery: comparisonKuery,
});
},

View file

@ -212,6 +212,9 @@ export const TopNFunctionsTable = ({
defaultMessage: 'Rank',
}),
align: 'right',
render: (_, { rank }) => {
return <EuiText style={{ whiteSpace: 'nowrap', fontSize: 'inherit' }}>{rank}</EuiText>;
},
},
{
field: TopNFunctionSortField.Frame,
@ -322,7 +325,7 @@ export const TopNFunctionsTable = ({
: row[sortField];
},
[sortDirection]
);
).slice(0, 100);
return (
<>