From 1dcdc9b76afd1e3aadde6e1028f4817ebe8cc603 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Wed, 26 Nov 2025 11:43:53 +0400 Subject: [PATCH] Add profiling.topn_functions --- .../ProfilingTopnFunctionsRequest.ts | 42 +++++++++++++++++++ .../ProfilingTopnFunctionsResponse.ts | 25 +++++++++++ 2 files changed, 67 insertions(+) create mode 100644 specification/profiling/topn_functions/ProfilingTopnFunctionsRequest.ts create mode 100644 specification/profiling/topn_functions/ProfilingTopnFunctionsResponse.ts diff --git a/specification/profiling/topn_functions/ProfilingTopnFunctionsRequest.ts b/specification/profiling/topn_functions/ProfilingTopnFunctionsRequest.ts new file mode 100644 index 0000000000..ee08212a06 --- /dev/null +++ b/specification/profiling/topn_functions/ProfilingTopnFunctionsRequest.ts @@ -0,0 +1,42 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { RequestBase } from '@_types/Base' +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' + +/** + * Extracts a list of topN functions from Universal Profiling. + * + * @rest_spec_name profiling.topn_functions + * @availability stack stability=stable visibility=private + * @doc_id universal-profiling + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_profiling/topn/functions' + methods: ['POST'] + } + ] + /** + * The filter conditions for stacktraces + * @codegen_name conditions + * */ + body: UserDefinedValue +} diff --git a/specification/profiling/topn_functions/ProfilingTopnFunctionsResponse.ts b/specification/profiling/topn_functions/ProfilingTopnFunctionsResponse.ts new file mode 100644 index 0000000000..831d24c574 --- /dev/null +++ b/specification/profiling/topn_functions/ProfilingTopnFunctionsResponse.ts @@ -0,0 +1,25 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' + +export class Response { + /** @codegen_name body */ + body: UserDefinedValue +}