mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co> Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com> Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
This commit is contained in:
parent
9378cefbd8
commit
14f940f400
25 changed files with 915 additions and 2394 deletions
|
@ -115,6 +115,8 @@ exports[`Error METRIC_SYSTEM_FREE_MEMORY 1`] = `undefined`;
|
|||
|
||||
exports[`Error METRIC_SYSTEM_TOTAL_MEMORY 1`] = `undefined`;
|
||||
|
||||
exports[`Error METRICSET_NAME 1`] = `undefined`;
|
||||
|
||||
exports[`Error OBSERVER_HOSTNAME 1`] = `undefined`;
|
||||
|
||||
exports[`Error OBSERVER_LISTENING 1`] = `undefined`;
|
||||
|
@ -352,6 +354,8 @@ exports[`Span METRIC_SYSTEM_FREE_MEMORY 1`] = `undefined`;
|
|||
|
||||
exports[`Span METRIC_SYSTEM_TOTAL_MEMORY 1`] = `undefined`;
|
||||
|
||||
exports[`Span METRICSET_NAME 1`] = `undefined`;
|
||||
|
||||
exports[`Span OBSERVER_HOSTNAME 1`] = `undefined`;
|
||||
|
||||
exports[`Span OBSERVER_LISTENING 1`] = `undefined`;
|
||||
|
@ -595,6 +599,8 @@ exports[`Transaction METRIC_SYSTEM_FREE_MEMORY 1`] = `undefined`;
|
|||
|
||||
exports[`Transaction METRIC_SYSTEM_TOTAL_MEMORY 1`] = `undefined`;
|
||||
|
||||
exports[`Transaction METRICSET_NAME 1`] = `undefined`;
|
||||
|
||||
exports[`Transaction OBSERVER_HOSTNAME 1`] = `undefined`;
|
||||
|
||||
exports[`Transaction OBSERVER_LISTENING 1`] = `undefined`;
|
||||
|
|
|
@ -108,6 +108,8 @@ export const METRIC_JAVA_THREAD_COUNT = 'jvm.thread.count';
|
|||
export const METRIC_JAVA_GC_COUNT = 'jvm.gc.count';
|
||||
export const METRIC_JAVA_GC_TIME = 'jvm.gc.time';
|
||||
|
||||
export const METRICSET_NAME = 'metricset.name';
|
||||
|
||||
export const LABEL_NAME = 'labels.name';
|
||||
|
||||
export const HOST = 'host';
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context';
|
||||
import { useFetcher } from '../../../../hooks/use_fetcher';
|
||||
import { useUrlParams } from '../../../../context/url_params_context/use_url_params';
|
||||
|
||||
|
@ -16,13 +15,12 @@ export function useInstanceDetailsFetcher({
|
|||
serviceNodeName: string;
|
||||
}) {
|
||||
const {
|
||||
urlParams: { start, end, kuery, environment },
|
||||
urlParams: { start, end },
|
||||
} = useUrlParams();
|
||||
const { transactionType } = useApmServiceContext();
|
||||
|
||||
const { data, status } = useFetcher(
|
||||
(callApmApi) => {
|
||||
if (!start || !end || !transactionType) {
|
||||
if (!start || !end) {
|
||||
return;
|
||||
}
|
||||
return callApmApi({
|
||||
|
@ -33,19 +31,11 @@ export function useInstanceDetailsFetcher({
|
|||
serviceName,
|
||||
serviceNodeName,
|
||||
},
|
||||
query: { start, end, transactionType, environment, kuery },
|
||||
query: { start, end },
|
||||
},
|
||||
});
|
||||
},
|
||||
[
|
||||
serviceName,
|
||||
serviceNodeName,
|
||||
start,
|
||||
end,
|
||||
transactionType,
|
||||
environment,
|
||||
kuery,
|
||||
]
|
||||
[serviceName, serviceNodeName, start, end]
|
||||
);
|
||||
|
||||
return { data, status };
|
||||
|
|
|
@ -40,9 +40,7 @@ export const config = {
|
|||
schema.literal(SearchAggregatedTransactionSetting.always),
|
||||
schema.literal(SearchAggregatedTransactionSetting.never),
|
||||
],
|
||||
{
|
||||
defaultValue: SearchAggregatedTransactionSetting.never,
|
||||
}
|
||||
{ defaultValue: SearchAggregatedTransactionSetting.auto }
|
||||
),
|
||||
telemetryCollectionEnabled: schema.boolean({ defaultValue: true }),
|
||||
metricsInterval: schema.number({ defaultValue: 30 }),
|
||||
|
|
|
@ -12,7 +12,10 @@ import {
|
|||
import { TRANSACTION_TYPE } from '../../../common/elasticsearch_fieldnames';
|
||||
import { rangeQuery } from '../../../../observability/server';
|
||||
import { Setup, SetupTimeRange } from '../helpers/setup_request';
|
||||
import { getProcessorEventForAggregatedTransactions } from '../helpers/aggregated_transactions';
|
||||
import {
|
||||
getDocumentTypeFilterForAggregatedTransactions,
|
||||
getProcessorEventForAggregatedTransactions,
|
||||
} from '../helpers/aggregated_transactions';
|
||||
import { calculateThroughput } from '../helpers/calculate_throughput';
|
||||
|
||||
export async function getTransactionsPerMinute({
|
||||
|
@ -40,7 +43,12 @@ export async function getTransactionsPerMinute({
|
|||
size: 0,
|
||||
query: {
|
||||
bool: {
|
||||
filter: rangeQuery(start, end),
|
||||
filter: [
|
||||
...rangeQuery(start, end),
|
||||
...getDocumentTypeFilterForAggregatedTransactions(
|
||||
searchAggregatedTransactions
|
||||
),
|
||||
],
|
||||
},
|
||||
},
|
||||
aggs: {
|
||||
|
|
|
@ -4,16 +4,20 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { merge } from 'lodash';
|
||||
import { ProcessorEvent } from '../../../common/processor_event';
|
||||
import {
|
||||
METRICSET_NAME,
|
||||
SERVICE_NAME,
|
||||
SERVICE_NODE_NAME,
|
||||
TRANSACTION_TYPE,
|
||||
} from '../../../common/elasticsearch_fieldnames';
|
||||
import { kqlQuery, rangeQuery } from '../../../../observability/server';
|
||||
import { environmentQuery } from '../../../common/utils/environment_query';
|
||||
import { getProcessorEventForAggregatedTransactions } from '../helpers/aggregated_transactions';
|
||||
import { rangeQuery } from '../../../../observability/server';
|
||||
import { Setup, SetupTimeRange } from '../helpers/setup_request';
|
||||
import { maybe } from '../../../common/utils/maybe';
|
||||
import {
|
||||
getDocumentTypeFilterForAggregatedTransactions,
|
||||
getProcessorEventForAggregatedTransactions,
|
||||
} from '../helpers/aggregated_transactions';
|
||||
|
||||
export interface KeyValue {
|
||||
key: string;
|
||||
|
@ -24,53 +28,100 @@ export async function getServiceInstanceMetadataDetails({
|
|||
serviceName,
|
||||
serviceNodeName,
|
||||
setup,
|
||||
searchAggregatedTransactions,
|
||||
transactionType,
|
||||
environment,
|
||||
kuery,
|
||||
}: {
|
||||
serviceName: string;
|
||||
serviceNodeName: string;
|
||||
setup: Setup & SetupTimeRange;
|
||||
searchAggregatedTransactions: boolean;
|
||||
transactionType: string;
|
||||
environment?: string;
|
||||
kuery?: string;
|
||||
}) {
|
||||
const { start, end, apmEventClient } = setup;
|
||||
const filter = [
|
||||
{ term: { [SERVICE_NAME]: serviceName } },
|
||||
{ term: { [SERVICE_NODE_NAME]: serviceNodeName } },
|
||||
{ term: { [TRANSACTION_TYPE]: transactionType } },
|
||||
...rangeQuery(start, end),
|
||||
...environmentQuery(environment),
|
||||
...kqlQuery(kuery),
|
||||
];
|
||||
|
||||
const response = await apmEventClient.search(
|
||||
'get_service_instance_metadata_details',
|
||||
{
|
||||
apm: {
|
||||
events: [
|
||||
getProcessorEventForAggregatedTransactions(
|
||||
searchAggregatedTransactions
|
||||
),
|
||||
],
|
||||
},
|
||||
body: {
|
||||
terminate_after: 1,
|
||||
size: 1,
|
||||
query: { bool: { filter } },
|
||||
},
|
||||
}
|
||||
);
|
||||
async function getApplicationMetricSample() {
|
||||
const response = await apmEventClient.search(
|
||||
'get_service_instance_metadata_details_application_metric',
|
||||
{
|
||||
apm: {
|
||||
events: [ProcessorEvent.metric],
|
||||
},
|
||||
body: {
|
||||
terminate_after: 1,
|
||||
size: 1,
|
||||
query: {
|
||||
bool: {
|
||||
filter: filter.concat({ term: { [METRICSET_NAME]: 'app' } }),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
const sample = response.hits.hits[0]?._source;
|
||||
|
||||
if (!sample) {
|
||||
return {};
|
||||
return maybe(response.hits.hits[0]?._source);
|
||||
}
|
||||
|
||||
async function getTransactionEventSample() {
|
||||
const response = await apmEventClient.search(
|
||||
'get_service_instance_metadata_details_application_transaction_event',
|
||||
{
|
||||
apm: {
|
||||
events: [ProcessorEvent.transaction],
|
||||
},
|
||||
body: {
|
||||
terminate_after: 1,
|
||||
size: 1,
|
||||
query: { bool: { filter } },
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
return maybe(response.hits.hits[0]?._source);
|
||||
}
|
||||
|
||||
async function getTransactionMetricSample() {
|
||||
const response = await apmEventClient.search(
|
||||
'get_service_instance_metadata_details_application_transaction_metric',
|
||||
{
|
||||
apm: {
|
||||
events: [getProcessorEventForAggregatedTransactions(true)],
|
||||
},
|
||||
body: {
|
||||
terminate_after: 1,
|
||||
size: 1,
|
||||
query: {
|
||||
bool: {
|
||||
filter: filter.concat(
|
||||
getDocumentTypeFilterForAggregatedTransactions(true)
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
return maybe(response.hits.hits[0]?._source);
|
||||
}
|
||||
|
||||
// we can expect the most detail of application metrics,
|
||||
// followed by transaction events, and then finally transaction metrics
|
||||
const [
|
||||
applicationMetricSample,
|
||||
transactionEventSample,
|
||||
transactionMetricSample,
|
||||
] = await Promise.all([
|
||||
getApplicationMetricSample(),
|
||||
getTransactionEventSample(),
|
||||
getTransactionMetricSample(),
|
||||
]);
|
||||
|
||||
const sample = merge(
|
||||
{},
|
||||
transactionMetricSample,
|
||||
transactionEventSample,
|
||||
applicationMetricSample
|
||||
);
|
||||
|
||||
const { agent, service, container, kubernetes, host, cloud } = sample;
|
||||
|
||||
return {
|
||||
|
|
|
@ -584,32 +584,17 @@ export const serviceInstancesMetadataDetails = createApmServerRoute({
|
|||
serviceName: t.string,
|
||||
serviceNodeName: t.string,
|
||||
}),
|
||||
query: t.intersection([
|
||||
t.type({ transactionType: t.string }),
|
||||
environmentRt,
|
||||
kueryRt,
|
||||
rangeRt,
|
||||
]),
|
||||
query: rangeRt,
|
||||
}),
|
||||
options: { tags: ['access:apm'] },
|
||||
handler: async (resources) => {
|
||||
const setup = await setupRequest(resources);
|
||||
const { serviceName, serviceNodeName } = resources.params.path;
|
||||
const { transactionType, environment, kuery } = resources.params.query;
|
||||
|
||||
const searchAggregatedTransactions = await getSearchAggregatedTransactions({
|
||||
...setup,
|
||||
kuery,
|
||||
});
|
||||
|
||||
return await getServiceInstanceMetadataDetails({
|
||||
searchAggregatedTransactions,
|
||||
setup,
|
||||
serviceName,
|
||||
serviceNodeName,
|
||||
transactionType,
|
||||
environment,
|
||||
kuery,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
|
@ -49,7 +49,7 @@ export default function customLinksTests({ getService }: FtrProviderContext) {
|
|||
},
|
||||
});
|
||||
expect(status).to.be(200);
|
||||
expect(body._inspect?.length).to.be(1);
|
||||
expect(body._inspect?.length).to.be(2);
|
||||
|
||||
// @ts-expect-error
|
||||
expect(Object.keys(body._inspect[0])).to.eql([
|
||||
|
|
|
@ -54,7 +54,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
|
||||
expectSnapshot(response.body.serviceCount).toMatchInline(`9`);
|
||||
|
||||
expectSnapshot(response.body.transactionPerMinute.value).toMatchInline(`64.8`);
|
||||
expectSnapshot(response.body.transactionPerMinute.value).toMatchInline(`41.4333333333333`);
|
||||
expectSnapshot(response.body.transactionPerMinute.timeseries.length).toMatchInline(`31`);
|
||||
|
||||
expectSnapshot(
|
||||
|
@ -68,23 +68,23 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
Array [
|
||||
Object {
|
||||
"x": "2020-12-08T13:57:00.000Z",
|
||||
"y": 2,
|
||||
"y": 10,
|
||||
},
|
||||
Object {
|
||||
"x": "2020-12-08T13:58:00.000Z",
|
||||
"y": 61,
|
||||
"y": 43,
|
||||
},
|
||||
Object {
|
||||
"x": "2020-12-08T13:59:00.000Z",
|
||||
"y": 36,
|
||||
"y": 18,
|
||||
},
|
||||
Object {
|
||||
"x": "2020-12-08T14:00:00.000Z",
|
||||
"y": 75,
|
||||
"y": 57,
|
||||
},
|
||||
Object {
|
||||
"x": "2020-12-08T14:01:00.000Z",
|
||||
"y": 36,
|
||||
"y": 15,
|
||||
},
|
||||
]
|
||||
`);
|
||||
|
|
|
@ -81,11 +81,11 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436840000,
|
||||
"y": 0.333333333333333,
|
||||
"y": 0.0833333333333333,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436900000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
|
@ -93,7 +93,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437080000,
|
||||
|
@ -101,11 +101,11 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437140000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
"y": 0.333333333333333,
|
||||
"y": 0.125,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
|
@ -113,19 +113,19 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437320000,
|
||||
"y": 0.333333333333333,
|
||||
"y": 0.166666666666667,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437380000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437440000,
|
||||
"y": 0.5,
|
||||
"y": 0.2,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437500000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437560000,
|
||||
|
@ -143,11 +143,11 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436780000,
|
||||
"y": 29997,
|
||||
"y": 23071,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436840000,
|
||||
"y": 48231,
|
||||
"y": 48287,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436900000,
|
||||
|
@ -155,7 +155,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
"y": 21973.8333333333,
|
||||
"y": 22015,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
|
@ -163,7 +163,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437080000,
|
||||
"y": 10142,
|
||||
"y": 10159,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437140000,
|
||||
|
@ -171,15 +171,15 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
"y": 28164.2222222222,
|
||||
"y": 28258.5555555556,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
"y": 15968,
|
||||
"y": 15999,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437320000,
|
||||
"y": 17347.3333333333,
|
||||
"y": 17407,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437380000,
|
||||
|
@ -187,7 +187,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437440000,
|
||||
"y": 11402.25,
|
||||
"y": 11425,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437500000,
|
||||
|
@ -195,7 +195,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437560000,
|
||||
"y": 18157,
|
||||
"y": 18175,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437620000,
|
||||
|
@ -276,59 +276,59 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436780000,
|
||||
"y": 1,
|
||||
"y": 5,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436840000,
|
||||
"y": 3,
|
||||
"y": 12,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436900000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
"y": 6,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437080000,
|
||||
"y": 2,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437140000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
"y": 9,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437320000,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
"y": 13,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
"y": 9,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437080000,
|
||||
"y": 5,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437140000,
|
||||
"y": 2,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
"y": 16,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
"y": 19,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437320000,
|
||||
"y": 6,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437380000,
|
||||
"y": 0,
|
||||
"y": 6,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437440000,
|
||||
"y": 4,
|
||||
"y": 10,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437500000,
|
||||
"y": 0,
|
||||
"y": 5,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437560000,
|
||||
"y": 1,
|
||||
"y": 4,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437620000,
|
||||
|
@ -424,7 +424,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
|
@ -452,23 +452,23 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437380000,
|
||||
"y": 0.142857142857143,
|
||||
"y": 0.0769230769230769,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437440000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437500000,
|
||||
"y": 0.222222222222222,
|
||||
"y": 0.117647058823529,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437560000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437620000,
|
||||
"y": 0.5,
|
||||
"y": 0.25,
|
||||
},
|
||||
],
|
||||
"latency": Array [
|
||||
|
@ -478,15 +478,15 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436780000,
|
||||
"y": 23426,
|
||||
"y": 23491,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436840000,
|
||||
"y": 8071285,
|
||||
"y": 8093695,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436900000,
|
||||
"y": 18416.75,
|
||||
"y": 18463,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
|
@ -494,7 +494,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
"y": 23650.5,
|
||||
"y": 23727,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437080000,
|
||||
|
@ -502,15 +502,15 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437140000,
|
||||
"y": 26507.6666666667,
|
||||
"y": 26591,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
"y": 22211,
|
||||
"y": 22271,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
"y": 11380.1666666667,
|
||||
"y": 11404.3333333333,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437320000,
|
||||
|
@ -518,7 +518,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437380000,
|
||||
"y": 32408.5714285714,
|
||||
"y": 32483.5714285714,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437440000,
|
||||
|
@ -526,7 +526,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437500000,
|
||||
"y": 15021,
|
||||
"y": 15083.4444444444,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437560000,
|
||||
|
@ -534,7 +534,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437620000,
|
||||
"y": 36142.5,
|
||||
"y": 56319,
|
||||
},
|
||||
],
|
||||
"memoryUsage": Array [
|
||||
|
@ -611,23 +611,23 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436780000,
|
||||
"y": 4,
|
||||
"y": 12,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436840000,
|
||||
"y": 2,
|
||||
"y": 4,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436900000,
|
||||
"y": 4,
|
||||
"y": 13,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
"y": 0,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
"y": 4,
|
||||
"y": 16,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437080000,
|
||||
|
@ -635,7 +635,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437140000,
|
||||
"y": 6,
|
||||
"y": 11,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
|
@ -643,7 +643,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
"y": 6,
|
||||
"y": 27,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437320000,
|
||||
|
@ -651,23 +651,23 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437380000,
|
||||
"y": 7,
|
||||
"y": 13,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437440000,
|
||||
"y": 0,
|
||||
"y": 12,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437500000,
|
||||
"y": 9,
|
||||
"y": 17,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437560000,
|
||||
"y": 0,
|
||||
"y": 17,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437620000,
|
||||
"y": 2,
|
||||
"y": 4,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -824,7 +824,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436060000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436120000,
|
||||
|
@ -852,23 +852,23 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436480000,
|
||||
"y": 0.142857142857143,
|
||||
"y": 0.0769230769230769,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436540000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436600000,
|
||||
"y": 0.222222222222222,
|
||||
"y": 0.117647058823529,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436660000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436720000,
|
||||
"y": 0.5,
|
||||
"y": 0.25,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436780000,
|
||||
|
@ -876,11 +876,11 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436840000,
|
||||
"y": 0.333333333333333,
|
||||
"y": 0.0833333333333333,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436900000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
|
@ -888,7 +888,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437080000,
|
||||
|
@ -896,11 +896,11 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437140000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
"y": 0.333333333333333,
|
||||
"y": 0.125,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
|
@ -908,19 +908,19 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437320000,
|
||||
"y": 0.333333333333333,
|
||||
"y": 0.166666666666667,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437380000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437440000,
|
||||
"y": 0.5,
|
||||
"y": 0.2,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437500000,
|
||||
"y": null,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437560000,
|
||||
|
@ -938,15 +938,15 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607435880000,
|
||||
"y": 23426,
|
||||
"y": 23491,
|
||||
},
|
||||
Object {
|
||||
"x": 1607435940000,
|
||||
"y": 8071285,
|
||||
"y": 8093695,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436000000,
|
||||
"y": 18416.75,
|
||||
"y": 18463,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436060000,
|
||||
|
@ -954,7 +954,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436120000,
|
||||
"y": 23650.5,
|
||||
"y": 23727,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436180000,
|
||||
|
@ -962,15 +962,15 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436240000,
|
||||
"y": 26507.6666666667,
|
||||
"y": 26591,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436300000,
|
||||
"y": 22211,
|
||||
"y": 22271,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436360000,
|
||||
"y": 11380.1666666667,
|
||||
"y": 11404.3333333333,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436420000,
|
||||
|
@ -978,7 +978,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436480000,
|
||||
"y": 32408.5714285714,
|
||||
"y": 32483.5714285714,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436540000,
|
||||
|
@ -986,7 +986,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436600000,
|
||||
"y": 15021,
|
||||
"y": 15083.4444444444,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436660000,
|
||||
|
@ -994,15 +994,15 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436720000,
|
||||
"y": 36142.5,
|
||||
"y": 56319,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436780000,
|
||||
"y": 29997,
|
||||
"y": 23071,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436840000,
|
||||
"y": 48231,
|
||||
"y": 48287,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436900000,
|
||||
|
@ -1010,7 +1010,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
"y": 21973.8333333333,
|
||||
"y": 22015,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
|
@ -1018,7 +1018,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437080000,
|
||||
"y": 10142,
|
||||
"y": 10159,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437140000,
|
||||
|
@ -1026,15 +1026,15 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
"y": 28164.2222222222,
|
||||
"y": 28258.5555555556,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
"y": 15968,
|
||||
"y": 15999,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437320000,
|
||||
"y": 17347.3333333333,
|
||||
"y": 17407,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437380000,
|
||||
|
@ -1042,7 +1042,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437440000,
|
||||
"y": 11402.25,
|
||||
"y": 11425,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437500000,
|
||||
|
@ -1050,7 +1050,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607437560000,
|
||||
"y": 18157,
|
||||
"y": 18175,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437620000,
|
||||
|
@ -1191,23 +1191,23 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607435880000,
|
||||
"y": 4,
|
||||
"y": 12,
|
||||
},
|
||||
Object {
|
||||
"x": 1607435940000,
|
||||
"y": 2,
|
||||
"y": 4,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436000000,
|
||||
"y": 4,
|
||||
"y": 13,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436060000,
|
||||
"y": 0,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436120000,
|
||||
"y": 4,
|
||||
"y": 16,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436180000,
|
||||
|
@ -1215,7 +1215,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436240000,
|
||||
"y": 6,
|
||||
"y": 11,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436300000,
|
||||
|
@ -1223,7 +1223,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436360000,
|
||||
"y": 6,
|
||||
"y": 27,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436420000,
|
||||
|
@ -1231,79 +1231,79 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"x": 1607436480000,
|
||||
"y": 7,
|
||||
"y": 13,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436540000,
|
||||
"y": 0,
|
||||
"y": 12,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436600000,
|
||||
"y": 9,
|
||||
"y": 17,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436660000,
|
||||
"y": 0,
|
||||
"y": 17,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436720000,
|
||||
"y": 2,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436780000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436840000,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436900000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
"y": 6,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437080000,
|
||||
"y": 2,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437140000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
"y": 9,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437320000,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437380000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437440000,
|
||||
"y": 4,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436780000,
|
||||
"y": 5,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436840000,
|
||||
"y": 12,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436900000,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
"y": 13,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
"y": 9,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437080000,
|
||||
"y": 5,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437140000,
|
||||
"y": 2,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
"y": 16,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
"y": 19,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437320000,
|
||||
"y": 6,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437380000,
|
||||
"y": 6,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437440000,
|
||||
"y": 10,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437500000,
|
||||
"y": 0,
|
||||
"y": 5,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437560000,
|
||||
"y": 1,
|
||||
"y": 4,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437620000,
|
||||
|
|
|
@ -31,7 +31,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
query: {
|
||||
start,
|
||||
end,
|
||||
transactionType: 'request',
|
||||
},
|
||||
})
|
||||
);
|
||||
|
@ -61,7 +60,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
query: {
|
||||
start,
|
||||
end,
|
||||
transactionType: 'request',
|
||||
},
|
||||
})
|
||||
);
|
||||
|
@ -89,7 +87,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
query: {
|
||||
start,
|
||||
end,
|
||||
transactionType: 'request',
|
||||
},
|
||||
})
|
||||
);
|
||||
|
|
|
@ -114,10 +114,10 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
expectSnapshot(values).toMatchInline(`
|
||||
Object {
|
||||
"cpuUsage": 0.0120166666666667,
|
||||
"errorRate": 0.16,
|
||||
"latency": 237339.813333333,
|
||||
"errorRate": 0.0415094339622641,
|
||||
"latency": 237995.266666667,
|
||||
"memoryUsage": 0.941324615478516,
|
||||
"throughput": 2.5,
|
||||
"throughput": 8.83333333333333,
|
||||
}
|
||||
`);
|
||||
});
|
||||
|
@ -173,9 +173,9 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
expectSnapshot(values).toMatchInline(`
|
||||
Object {
|
||||
"cpuUsage": 0.00111666666666667,
|
||||
"errorRate": 0.0373134328358209,
|
||||
"latency": 70518.9328358209,
|
||||
"throughput": 4.46666666666667,
|
||||
"errorRate": 0.00963391136801541,
|
||||
"latency": 71576.4545454545,
|
||||
"throughput": 17.3,
|
||||
}
|
||||
`);
|
||||
|
||||
|
@ -260,10 +260,10 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
expectSnapshot(values).toMatchInline(`
|
||||
Object {
|
||||
"cpuUsage": 0.0120666666666667,
|
||||
"errorRate": 0.111111111111111,
|
||||
"latency": 379742.555555556,
|
||||
"errorRate": 0.0333333333333333,
|
||||
"latency": 389086.636363636,
|
||||
"memoryUsage": 0.939879608154297,
|
||||
"throughput": 3,
|
||||
"throughput": 10,
|
||||
}
|
||||
`);
|
||||
});
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -68,17 +68,17 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
it('has the correct start date', () => {
|
||||
expectSnapshot(
|
||||
new Date(first(throughputResponse.currentPeriod)?.x ?? NaN).toISOString()
|
||||
).toMatchInline(`"2020-12-08T13:57:30.000Z"`);
|
||||
).toMatchInline(`"2020-12-08T13:57:00.000Z"`);
|
||||
});
|
||||
|
||||
it('has the correct end date', () => {
|
||||
expectSnapshot(
|
||||
new Date(last(throughputResponse.currentPeriod)?.x ?? NaN).toISOString()
|
||||
).toMatchInline(`"2020-12-08T14:27:30.000Z"`);
|
||||
).toMatchInline(`"2020-12-08T14:27:00.000Z"`);
|
||||
});
|
||||
|
||||
it('has the correct number of buckets', () => {
|
||||
expectSnapshot(throughputResponse.currentPeriod.length).toMatchInline(`61`);
|
||||
expectSnapshot(throughputResponse.currentPeriod.length).toMatchInline(`31`);
|
||||
});
|
||||
|
||||
it('has the correct throughput', () => {
|
||||
|
@ -122,26 +122,26 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
it('has the correct start date', () => {
|
||||
expectSnapshot(
|
||||
new Date(first(throughputResponse.currentPeriod)?.x ?? NaN).toISOString()
|
||||
).toMatchInline(`"2020-12-08T14:12:50.000Z"`);
|
||||
).toMatchInline(`"2020-12-08T14:12:00.000Z"`);
|
||||
|
||||
expectSnapshot(
|
||||
new Date(first(throughputResponse.previousPeriod)?.x ?? NaN).toISOString()
|
||||
).toMatchInline(`"2020-12-08T14:12:50.000Z"`);
|
||||
).toMatchInline(`"2020-12-08T14:12:00.000Z"`);
|
||||
});
|
||||
|
||||
it('has the correct end date', () => {
|
||||
expectSnapshot(
|
||||
new Date(last(throughputResponse.currentPeriod)?.x ?? NaN).toISOString()
|
||||
).toMatchInline(`"2020-12-08T14:27:50.000Z"`);
|
||||
).toMatchInline(`"2020-12-08T14:27:00.000Z"`);
|
||||
|
||||
expectSnapshot(
|
||||
new Date(last(throughputResponse.previousPeriod)?.x ?? NaN).toISOString()
|
||||
).toMatchInline(`"2020-12-08T14:27:50.000Z"`);
|
||||
).toMatchInline(`"2020-12-08T14:27:00.000Z"`);
|
||||
});
|
||||
|
||||
it('has the correct number of buckets', () => {
|
||||
expectSnapshot(throughputResponse.currentPeriod.length).toMatchInline(`91`);
|
||||
expectSnapshot(throughputResponse.previousPeriod.length).toMatchInline(`91`);
|
||||
expectSnapshot(throughputResponse.currentPeriod.length).toMatchInline(`16`);
|
||||
expectSnapshot(throughputResponse.previousPeriod.length).toMatchInline(`16`);
|
||||
});
|
||||
|
||||
it('has the correct throughput', () => {
|
||||
|
|
|
@ -98,18 +98,18 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
Array [
|
||||
Object {
|
||||
"avgResponseTime": Object {
|
||||
"value": 420419.34550767,
|
||||
"value": 421616.337243402,
|
||||
},
|
||||
"transactionErrorRate": Object {
|
||||
"value": 0,
|
||||
},
|
||||
"transactionsPerMinute": Object {
|
||||
"value": 45.6333333333333,
|
||||
"value": 25.2,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avgResponseTime": Object {
|
||||
"value": 2382833.33333333,
|
||||
"value": 2387606.33333333,
|
||||
},
|
||||
"transactionErrorRate": Object {
|
||||
"value": null,
|
||||
|
@ -120,79 +120,79 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
},
|
||||
Object {
|
||||
"avgResponseTime": Object {
|
||||
"value": 631521.83908046,
|
||||
"value": 633386.908045977,
|
||||
},
|
||||
"transactionErrorRate": Object {
|
||||
"value": 0.0229885057471264,
|
||||
"value": 0.027027027027027,
|
||||
},
|
||||
"transactionsPerMinute": Object {
|
||||
"value": 2.9,
|
||||
"value": 2.46666666666667,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avgResponseTime": Object {
|
||||
"value": 27946.1484375,
|
||||
"value": 27891.1507936508,
|
||||
},
|
||||
"transactionErrorRate": Object {
|
||||
"value": 0.015625,
|
||||
"value": 0.0186915887850467,
|
||||
},
|
||||
"transactionsPerMinute": Object {
|
||||
"value": 4.26666666666667,
|
||||
"value": 3.56666666666667,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avgResponseTime": Object {
|
||||
"value": 237339.813333333,
|
||||
"value": 237995.266666667,
|
||||
},
|
||||
"transactionErrorRate": Object {
|
||||
"value": 0.16,
|
||||
"value": 0.159420289855072,
|
||||
},
|
||||
"transactionsPerMinute": Object {
|
||||
"value": 2.5,
|
||||
"value": 2.3,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avgResponseTime": Object {
|
||||
"value": 24920.1052631579,
|
||||
"value": 24989.3157894737,
|
||||
},
|
||||
"transactionErrorRate": Object {
|
||||
"value": 0.0210526315789474,
|
||||
"value": 0.0263157894736842,
|
||||
},
|
||||
"transactionsPerMinute": Object {
|
||||
"value": 3.16666666666667,
|
||||
"value": 2.53333333333333,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avgResponseTime": Object {
|
||||
"value": 29542.6607142857,
|
||||
"value": 29161.3703703704,
|
||||
},
|
||||
"transactionErrorRate": Object {
|
||||
"value": 0.0357142857142857,
|
||||
"value": 0.0392156862745098,
|
||||
},
|
||||
"transactionsPerMinute": Object {
|
||||
"value": 1.86666666666667,
|
||||
"value": 1.7,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avgResponseTime": Object {
|
||||
"value": 70518.9328358209,
|
||||
"value": 71576.4545454545,
|
||||
},
|
||||
"transactionErrorRate": Object {
|
||||
"value": 0.0373134328358209,
|
||||
"value": 0.0454545454545455,
|
||||
},
|
||||
"transactionsPerMinute": Object {
|
||||
"value": 4.46666666666667,
|
||||
"value": 3.66666666666667,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avgResponseTime": Object {
|
||||
"value": 2319812.5,
|
||||
"value": 2324991,
|
||||
},
|
||||
"transactionErrorRate": Object {
|
||||
"value": null,
|
||||
},
|
||||
"transactionsPerMinute": Object {
|
||||
"value": 0.533333333333333,
|
||||
"value": 0.5,
|
||||
},
|
||||
},
|
||||
]
|
||||
|
@ -329,18 +329,18 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
expect(healthStatuses.filter(Boolean).length).to.be.greaterThan(0);
|
||||
|
||||
expectSnapshot(healthStatuses).toMatchInline(`
|
||||
Array [
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
]
|
||||
`);
|
||||
Array [
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
"healthy",
|
||||
]
|
||||
`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -60,7 +60,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
|
||||
expectSnapshot(firstItem).toMatchInline(`
|
||||
Object {
|
||||
"averageResponseTime": 1733,
|
||||
"averageResponseTime": 1735,
|
||||
"impact": 0,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-java",
|
||||
|
@ -75,7 +75,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
|
||||
expectSnapshot(lastItem).toMatchInline(`
|
||||
Object {
|
||||
"averageResponseTime": 550905.994936709,
|
||||
"averageResponseTime": 553058.519181586,
|
||||
"impact": 100,
|
||||
"key": Object {
|
||||
"service.name": "kibana",
|
||||
|
@ -84,7 +84,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
"serviceName": "kibana",
|
||||
"transactionName": "POST /api/apm/settings/agent-configuration/search",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 13.1666666666667,
|
||||
"transactionsPerMinute": 5.4,
|
||||
}
|
||||
`);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,75 +4,43 @@ exports[`APM API tests basic apm_8.0.0 Latency with a basic license when data is
|
|||
Array [
|
||||
Object {
|
||||
"x": 1607436780000,
|
||||
"y": 51029,
|
||||
"y": 36479,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436820000,
|
||||
"y": 38124,
|
||||
"x": 1607436840000,
|
||||
"y": 16383,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436860000,
|
||||
"y": 16327,
|
||||
"x": 1607436960000,
|
||||
"y": 35081.6666666667,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436980000,
|
||||
"y": 35617.5,
|
||||
"x": 1607437080000,
|
||||
"y": 31019,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436990000,
|
||||
"y": 34599.75,
|
||||
"x": 1607437140000,
|
||||
"y": 22271,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437100000,
|
||||
"y": 26980,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437110000,
|
||||
"y": 42808,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437130000,
|
||||
"y": 22230.5,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437220000,
|
||||
"y": 34973,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437230000,
|
||||
"y": 19284.2,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437240000,
|
||||
"y": 9280,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437250000,
|
||||
"y": 42777,
|
||||
"x": 1607437200000,
|
||||
"y": 21972.3333333333,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
"y": 10702,
|
||||
"y": 21033.6666666667,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437340000,
|
||||
"y": 22452,
|
||||
"x": 1607437320000,
|
||||
"y": 22559,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437470000,
|
||||
"y": 14495.5,
|
||||
"x": 1607437440000,
|
||||
"y": 12704.4545454545,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437480000,
|
||||
"y": 11644.5714285714,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437570000,
|
||||
"y": 17359.6666666667,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437590000,
|
||||
"y": 11394.2,
|
||||
"x": 1607437560000,
|
||||
"y": 13687,
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
@ -80,88 +48,44 @@ Array [
|
|||
exports[`APM API tests basic apm_8.0.0 Latency with a basic license when data is loaded time comparison returns some data 2`] = `
|
||||
Array [
|
||||
Object {
|
||||
"x": 1607436800000,
|
||||
"y": 23448.25,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436820000,
|
||||
"y": 25181,
|
||||
"x": 1607436780000,
|
||||
"y": 24047,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436840000,
|
||||
"y": 16834,
|
||||
"y": 16895,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436910000,
|
||||
"y": 21582,
|
||||
"x": 1607436900000,
|
||||
"y": 21631,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437040000,
|
||||
"y": 31800,
|
||||
"x": 1607437020000,
|
||||
"y": 22980.3333333333,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437050000,
|
||||
"y": 21341,
|
||||
"x": 1607437140000,
|
||||
"y": 17145.6666666667,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437060000,
|
||||
"y": 21108.5,
|
||||
"x": 1607437200000,
|
||||
"y": 24383,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437150000,
|
||||
"y": 12147.3333333333,
|
||||
"x": 1607437260000,
|
||||
"y": 24271,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437160000,
|
||||
"y": 23941.5,
|
||||
"x": 1607437380000,
|
||||
"y": 22711,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437180000,
|
||||
"y": 18244,
|
||||
"x": 1607437500000,
|
||||
"y": 32234.0769230769,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437240000,
|
||||
"y": 24359.5,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437280000,
|
||||
"y": 27767,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437290000,
|
||||
"y": 21909.6666666667,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437390000,
|
||||
"y": 31521,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437410000,
|
||||
"y": 20227.5,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437420000,
|
||||
"y": 18664,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437510000,
|
||||
"y": 14197.5,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437520000,
|
||||
"y": 19199.8571428571,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437540000,
|
||||
"y": 63745.75,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437640000,
|
||||
"y": 63220,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437660000,
|
||||
"y": 20040,
|
||||
"x": 1607437620000,
|
||||
"y": 63407,
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
exports[`APM API tests basic apm_8.0.0 Top transaction groups when data is loaded returns the correct buckets (when ignoring samples) 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"averageResponseTime": 2722.75,
|
||||
"averageResponseTime": 2731,
|
||||
"impact": 0,
|
||||
"key": "GET /*",
|
||||
"p95": 3504,
|
||||
|
@ -13,8 +13,8 @@ Array [
|
|||
"transactionsPerMinute": 0.133333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 11083.5,
|
||||
"impact": 0.791851708281718,
|
||||
"averageResponseTime": 11151,
|
||||
"impact": 0.796826141612071,
|
||||
"key": "GET /api/products/:id",
|
||||
"p95": 17632,
|
||||
"serviceName": "opbeans-node",
|
||||
|
@ -23,28 +23,28 @@ Array [
|
|||
"transactionsPerMinute": 0.0666666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 12828,
|
||||
"impact": 1.03686506498577,
|
||||
"averageResponseTime": 12887,
|
||||
"impact": 1.03997786983119,
|
||||
"key": "GET /api/orders/:id",
|
||||
"p95": 22128,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/orders/:id",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0666666666666667,
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 11634,
|
||||
"impact": 2.50315308103067,
|
||||
"averageResponseTime": 11655,
|
||||
"impact": 2.4998686896629,
|
||||
"key": "GET /api/products",
|
||||
"p95": 21728,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/products",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.133333333333333,
|
||||
"transactionsPerMinute": 0.1,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 15788.6666666667,
|
||||
"impact": 2.56143943415889,
|
||||
"averageResponseTime": 15817.6666666667,
|
||||
"impact": 2.55820549542515,
|
||||
"key": "GET /api/types",
|
||||
"p95": 21600,
|
||||
"serviceName": "opbeans-node",
|
||||
|
@ -53,8 +53,8 @@ Array [
|
|||
"transactionsPerMinute": 0.1,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 12519.25,
|
||||
"impact": 2.75181811287047,
|
||||
"averageResponseTime": 12559,
|
||||
"impact": 2.75310505177129,
|
||||
"key": "GET /api/products/:id/customers",
|
||||
"p95": 28384,
|
||||
"serviceName": "opbeans-node",
|
||||
|
@ -63,8 +63,8 @@ Array [
|
|||
"transactionsPerMinute": 0.133333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 17371.25,
|
||||
"impact": 4.11473563276508,
|
||||
"averageResponseTime": 17391,
|
||||
"impact": 4.10668702268692,
|
||||
"key": "GET /api/orders",
|
||||
"p95": 21600,
|
||||
"serviceName": "opbeans-node",
|
||||
|
@ -73,18 +73,18 @@ Array [
|
|||
"transactionsPerMinute": 0.133333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 12698.8571428571,
|
||||
"impact": 5.47758292813784,
|
||||
"averageResponseTime": 12739.5714285714,
|
||||
"impact": 5.48022816484175,
|
||||
"key": "GET /api/products/top",
|
||||
"p95": 23024,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/products/top",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.233333333333333,
|
||||
"transactionsPerMinute": 0.2,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 20919.4,
|
||||
"impact": 6.58045904365437,
|
||||
"averageResponseTime": 20984.6,
|
||||
"impact": 6.58295486776174,
|
||||
"key": "GET /api/customers/:id",
|
||||
"p95": 58592,
|
||||
"serviceName": "opbeans-node",
|
||||
|
@ -93,8 +93,8 @@ Array [
|
|||
"transactionsPerMinute": 0.166666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 17268.1428571429,
|
||||
"impact": 7.72371425922961,
|
||||
"averageResponseTime": 17301.8571428571,
|
||||
"impact": 7.71677585850698,
|
||||
"key": "GET /api/types/:id",
|
||||
"p95": 35040,
|
||||
"serviceName": "opbeans-node",
|
||||
|
@ -103,34 +103,34 @@ Array [
|
|||
"transactionsPerMinute": 0.233333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 22856.6666666667,
|
||||
"impact": 8.86577565793355,
|
||||
"averageResponseTime": 22900.3333333333,
|
||||
"impact": 8.85753003505111,
|
||||
"key": "GET /api/stats",
|
||||
"p95": 44768,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/stats",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.2,
|
||||
"transactionsPerMinute": 0.166666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 34805.1666666667,
|
||||
"impact": 13.9002418532532,
|
||||
"averageResponseTime": 34943,
|
||||
"impact": 13.9177752177125,
|
||||
"key": "GET /api/customers",
|
||||
"p95": 42880,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/customers",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.2,
|
||||
"transactionsPerMinute": 0.166666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 34997.4390243902,
|
||||
"averageResponseTime": 35093.6341463415,
|
||||
"impact": 100,
|
||||
"key": "GET /api",
|
||||
"p95": 103392,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 1.36666666666667,
|
||||
"transactionsPerMinute": 0.9,
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
|
|
@ -158,7 +158,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
"y": 30501,
|
||||
"y": 30527,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
|
@ -174,7 +174,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
"y": 46937.5,
|
||||
"y": 47167,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
|
@ -215,15 +215,15 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436780000,
|
||||
"y": 69429,
|
||||
"y": 69631,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436840000,
|
||||
"y": 8071285,
|
||||
"y": 8093695,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436900000,
|
||||
"y": 31949,
|
||||
"y": 31999,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
|
@ -231,7 +231,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
"y": 47755,
|
||||
"y": 47871,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437080000,
|
||||
|
@ -239,7 +239,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607437140000,
|
||||
"y": 35403,
|
||||
"y": 35519,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
|
@ -255,7 +255,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607437380000,
|
||||
"y": 48137,
|
||||
"y": 48255,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437440000,
|
||||
|
@ -263,7 +263,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607437500000,
|
||||
"y": 35457,
|
||||
"y": 35583,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437560000,
|
||||
|
@ -357,7 +357,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436840000,
|
||||
"y": 2,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436900000,
|
||||
|
@ -377,7 +377,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607437140000,
|
||||
"y": 4,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
|
@ -422,15 +422,15 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607435880000,
|
||||
"y": 69429,
|
||||
"y": 69631,
|
||||
},
|
||||
Object {
|
||||
"x": 1607435940000,
|
||||
"y": 8071285,
|
||||
"y": 8093695,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436000000,
|
||||
"y": 31949,
|
||||
"y": 31999,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436060000,
|
||||
|
@ -438,7 +438,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436120000,
|
||||
"y": 47755,
|
||||
"y": 47871,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436180000,
|
||||
|
@ -446,7 +446,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436240000,
|
||||
"y": 35403,
|
||||
"y": 35519,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436300000,
|
||||
|
@ -462,7 +462,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436480000,
|
||||
"y": 48137,
|
||||
"y": 48255,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436540000,
|
||||
|
@ -470,7 +470,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436600000,
|
||||
"y": 35457,
|
||||
"y": 35583,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436660000,
|
||||
|
@ -494,7 +494,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
"y": 30501,
|
||||
"y": 30527,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
|
@ -510,7 +510,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
"y": 46937.5,
|
||||
"y": 47167,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
|
@ -555,7 +555,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607435940000,
|
||||
"y": 2,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436000000,
|
||||
|
@ -575,7 +575,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436240000,
|
||||
"y": 4,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436300000,
|
||||
|
@ -809,15 +809,15 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607435880000,
|
||||
"y": 69429,
|
||||
"y": 69631,
|
||||
},
|
||||
Object {
|
||||
"x": 1607435940000,
|
||||
"y": 8198285,
|
||||
"y": 8224767,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436000000,
|
||||
"y": 31949,
|
||||
"y": 31999,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436060000,
|
||||
|
@ -825,7 +825,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436120000,
|
||||
"y": 47755,
|
||||
"y": 47871,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436180000,
|
||||
|
@ -833,7 +833,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436240000,
|
||||
"y": 73411,
|
||||
"y": 73727,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436300000,
|
||||
|
@ -849,7 +849,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436480000,
|
||||
"y": 55116,
|
||||
"y": 55295,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436540000,
|
||||
|
@ -857,7 +857,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436600000,
|
||||
"y": 35457,
|
||||
"y": 35583,
|
||||
},
|
||||
Object {
|
||||
"x": 1607436660000,
|
||||
|
@ -881,7 +881,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607436960000,
|
||||
"y": 46040,
|
||||
"y": 46079,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437020000,
|
||||
|
@ -897,7 +897,7 @@ Array [
|
|||
},
|
||||
Object {
|
||||
"x": 1607437200000,
|
||||
"y": 82486,
|
||||
"y": 82943,
|
||||
},
|
||||
Object {
|
||||
"x": 1607437260000,
|
||||
|
|
|
@ -101,7 +101,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
new Date(
|
||||
first(errorRateResponse.currentPeriod.transactionErrorRate)?.x ?? NaN
|
||||
).toISOString()
|
||||
).toMatchInline(`"2020-12-08T13:57:30.000Z"`);
|
||||
).toMatchInline(`"2020-12-08T13:57:00.000Z"`);
|
||||
});
|
||||
|
||||
it('has the correct end date', () => {
|
||||
|
@ -109,17 +109,19 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
new Date(
|
||||
last(errorRateResponse.currentPeriod.transactionErrorRate)?.x ?? NaN
|
||||
).toISOString()
|
||||
).toMatchInline(`"2020-12-08T14:27:30.000Z"`);
|
||||
).toMatchInline(`"2020-12-08T14:27:00.000Z"`);
|
||||
});
|
||||
|
||||
it('has the correct number of buckets', () => {
|
||||
expectSnapshot(errorRateResponse.currentPeriod.transactionErrorRate.length).toMatchInline(
|
||||
`61`
|
||||
`31`
|
||||
);
|
||||
});
|
||||
|
||||
it('has the correct calculation for average', () => {
|
||||
expectSnapshot(errorRateResponse.currentPeriod.average).toMatchInline(`0.16`);
|
||||
expectSnapshot(errorRateResponse.currentPeriod.average).toMatchInline(
|
||||
`0.159420289855072`
|
||||
);
|
||||
});
|
||||
|
||||
it('has the correct error rate', () => {
|
||||
|
@ -170,12 +172,12 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
new Date(
|
||||
first(errorRateResponse.currentPeriod.transactionErrorRate)?.x ?? NaN
|
||||
).toISOString()
|
||||
).toMatchInline(`"2020-12-08T14:12:50.000Z"`);
|
||||
).toMatchInline(`"2020-12-08T14:12:00.000Z"`);
|
||||
expectSnapshot(
|
||||
new Date(
|
||||
first(errorRateResponse.previousPeriod.transactionErrorRate)?.x ?? NaN
|
||||
).toISOString()
|
||||
).toMatchInline(`"2020-12-08T14:12:50.000Z"`);
|
||||
).toMatchInline(`"2020-12-08T14:12:00.000Z"`);
|
||||
});
|
||||
|
||||
it('has the correct end date', () => {
|
||||
|
@ -183,30 +185,28 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
new Date(
|
||||
last(errorRateResponse.currentPeriod.transactionErrorRate)?.x ?? NaN
|
||||
).toISOString()
|
||||
).toMatchInline(`"2020-12-08T14:27:50.000Z"`);
|
||||
).toMatchInline(`"2020-12-08T14:27:00.000Z"`);
|
||||
expectSnapshot(
|
||||
new Date(
|
||||
last(errorRateResponse.previousPeriod.transactionErrorRate)?.x ?? NaN
|
||||
).toISOString()
|
||||
).toMatchInline(`"2020-12-08T14:27:50.000Z"`);
|
||||
).toMatchInline(`"2020-12-08T14:27:00.000Z"`);
|
||||
});
|
||||
|
||||
it('has the correct number of buckets', () => {
|
||||
expectSnapshot(errorRateResponse.currentPeriod.transactionErrorRate.length).toMatchInline(
|
||||
`91`
|
||||
`16`
|
||||
);
|
||||
expectSnapshot(
|
||||
errorRateResponse.previousPeriod.transactionErrorRate.length
|
||||
).toMatchInline(`91`);
|
||||
).toMatchInline(`16`);
|
||||
});
|
||||
|
||||
it('has the correct calculation for average', () => {
|
||||
expectSnapshot(errorRateResponse.currentPeriod.average).toMatchInline(
|
||||
`0.233333333333333`
|
||||
);
|
||||
expectSnapshot(errorRateResponse.previousPeriod.average).toMatchInline(
|
||||
`0.111111111111111`
|
||||
`0.206896551724138`
|
||||
);
|
||||
expectSnapshot(errorRateResponse.previousPeriod.average).toMatchInline(`0.125`);
|
||||
});
|
||||
|
||||
it('has the correct error rate', () => {
|
||||
|
|
|
@ -110,7 +110,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
expect(response.status).to.be(200);
|
||||
const latencyChartReturn = response.body as LatencyChartReturnType;
|
||||
expect(latencyChartReturn.currentPeriod.overallAvgDuration).not.to.be(null);
|
||||
expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(61);
|
||||
expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(31);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -134,7 +134,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
expect(response.status).to.be(200);
|
||||
const latencyChartReturn = response.body as LatencyChartReturnType;
|
||||
expect(latencyChartReturn.currentPeriod.overallAvgDuration).not.to.be(null);
|
||||
expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(61);
|
||||
expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(31);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -160,10 +160,10 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(latencyChartReturn.currentPeriod.overallAvgDuration).not.to.be(null);
|
||||
expectSnapshot(latencyChartReturn.currentPeriod.overallAvgDuration).toMatchInline(
|
||||
`24920.1052631579`
|
||||
`24989.3157894737`
|
||||
);
|
||||
|
||||
expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(61);
|
||||
expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(31);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -280,8 +280,8 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
const currentPeriodFirstItem = currentPeriodItems[0];
|
||||
const previousPeriodFirstItem = previousPeriodItems[0];
|
||||
|
||||
expectSnapshot(roundNumber(currentPeriodFirstItem.impact)).toMatchInline(`"21.75"`);
|
||||
expectSnapshot(roundNumber(previousPeriodFirstItem.impact)).toMatchInline(`"96.94"`);
|
||||
expectSnapshot(roundNumber(currentPeriodFirstItem.impact)).toMatchInline(`"21.29"`);
|
||||
expectSnapshot(roundNumber(previousPeriodFirstItem.impact)).toMatchInline(`"97.03"`);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -77,9 +77,9 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
"APIRestController#customer",
|
||||
"ResourceHttpRequestHandler",
|
||||
"APIRestController#customers",
|
||||
"APIRestController#stats",
|
||||
"APIRestController#topProducts",
|
||||
"APIRestController#orders",
|
||||
"APIRestController#stats",
|
||||
"APIRestController#product",
|
||||
"APIRestController#products",
|
||||
"DispatcherServlet#doPost",
|
||||
|
@ -91,18 +91,18 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
);
|
||||
expectSnapshot(impacts).toMatchInline(`
|
||||
Array [
|
||||
93.9295870910491,
|
||||
0.850308244392878,
|
||||
0.905514602241759,
|
||||
0.699947181217412,
|
||||
0.143906183235671,
|
||||
1.35334507158962,
|
||||
0.860178761411346,
|
||||
0.476138685202191,
|
||||
0.446650726277923,
|
||||
0.262571482598846,
|
||||
0.062116281544223,
|
||||
0.00973568923904662,
|
||||
93.9315487787012,
|
||||
0.850246601543056,
|
||||
0.904925560144193,
|
||||
0.69948730072783,
|
||||
0.144008466274819,
|
||||
1.35206610551638,
|
||||
0.476127116253573,
|
||||
0.446552298379043,
|
||||
0.860493303928453,
|
||||
0.262800744776717,
|
||||
0.0620236424870074,
|
||||
0.00972008126772269,
|
||||
]
|
||||
`);
|
||||
|
||||
|
@ -113,11 +113,11 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
expectSnapshot(pick(firstItem, 'name', 'latency', 'throughput', 'errorRate', 'impact'))
|
||||
.toMatchInline(`
|
||||
Object {
|
||||
"errorRate": 0.0625,
|
||||
"impact": 93.9295870910491,
|
||||
"latency": 1044995.1875,
|
||||
"errorRate": 0.0833333333333333,
|
||||
"impact": 93.9315487787012,
|
||||
"latency": 1047903,
|
||||
"name": "DispatcherServlet#doGet",
|
||||
"throughput": 0.533333333333333,
|
||||
"throughput": 0.4,
|
||||
}
|
||||
`);
|
||||
});
|
||||
|
@ -140,7 +140,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
const transctionsGroupsPrimaryStatistics = response.body as TransactionsGroupsPrimaryStatistics;
|
||||
|
||||
const firstItem = transctionsGroupsPrimaryStatistics.transactionGroups[0];
|
||||
expectSnapshot(firstItem.latency).toMatchInline(`8198285`);
|
||||
expectSnapshot(firstItem.latency).toMatchInline(`8224767`);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue