mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 19:13:14 -04:00
closes #198964 closes #198966 part of https://github.com/elastic/kibana/issues/193245 ### How to test - Serverless ``` node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts --grep="APM" ``` - Stateful ``` node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep="APM" ``` - MKI tested against [MKI](https://github.com/crespocarlos/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki)
13 lines
509 B
TypeScript
13 lines
509 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
* 2.0.
|
|
*/
|
|
|
|
import { isFiniteNumber } from '@kbn/apm-plugin/common/utils/is_finite_number';
|
|
import { Maybe } from '@kbn/apm-plugin/typings/common';
|
|
|
|
export function roundNumber(num: Maybe<number>) {
|
|
return isFiniteNumber(num) ? Number(num.toPrecision(4)) : null;
|
|
}
|