|
@@ -119,13 +119,15 @@ describe('Performance > Transaction Spans', function () {
|
|
|
expect(cards).toHaveLength(2);
|
|
|
for (let i = 0; i < cards.length; i++) {
|
|
|
const card = cards[i];
|
|
|
+ // need to narrow the search to the upper half of the card
|
|
|
+ const upper = await within(card).findByTestId('suspect-card-upper');
|
|
|
|
|
|
// these headers should be present by default
|
|
|
- expect(await within(card).findByText('Span Operation')).toBeInTheDocument();
|
|
|
- expect(await within(card).findByText('p75 Duration')).toBeInTheDocument();
|
|
|
- expect(await within(card).findByText('Frequency')).toBeInTheDocument();
|
|
|
+ expect(await within(upper).findByText('Span Operation')).toBeInTheDocument();
|
|
|
+ expect(await within(upper).findByText('p75 Exclusive Time')).toBeInTheDocument();
|
|
|
+ expect(await within(upper).findByText('Frequency')).toBeInTheDocument();
|
|
|
expect(
|
|
|
- await within(card).findByText('Total Cumulative Duration')
|
|
|
+ await within(upper).findByText('Total Exclusive Time')
|
|
|
).toBeInTheDocument();
|
|
|
|
|
|
for (const example of SAMPLE_SPANS[i].examples) {
|
|
@@ -141,10 +143,10 @@ describe('Performance > Transaction Spans', function () {
|
|
|
});
|
|
|
|
|
|
[
|
|
|
- {sort: SpanSortPercentiles.P50_EXCLUSIVE_TIME, label: 'p50 Duration'},
|
|
|
- {sort: SpanSortPercentiles.P75_EXCLUSIVE_TIME, label: 'p75 Duration'},
|
|
|
- {sort: SpanSortPercentiles.P95_EXCLUSIVE_TIME, label: 'p95 Duration'},
|
|
|
- {sort: SpanSortPercentiles.P99_EXCLUSIVE_TIME, label: 'p99 Duration'},
|
|
|
+ {sort: SpanSortPercentiles.P50_EXCLUSIVE_TIME, label: 'p50 Exclusive Time'},
|
|
|
+ {sort: SpanSortPercentiles.P75_EXCLUSIVE_TIME, label: 'p75 Exclusive Time'},
|
|
|
+ {sort: SpanSortPercentiles.P95_EXCLUSIVE_TIME, label: 'p95 Exclusive Time'},
|
|
|
+ {sort: SpanSortPercentiles.P99_EXCLUSIVE_TIME, label: 'p99 Exclusive Time'},
|
|
|
].forEach(({sort, label}) => {
|
|
|
it('renders the right percentile header', async function () {
|
|
|
const initialData = initializeData({query: {sort}});
|
|
@@ -160,16 +162,18 @@ describe('Performance > Transaction Spans', function () {
|
|
|
expect(cards).toHaveLength(2);
|
|
|
for (let i = 0; i < cards.length; i++) {
|
|
|
const card = cards[i];
|
|
|
+ // need to narrow the search to the upper half of the card
|
|
|
+ const upper = await within(card).findByTestId('suspect-card-upper');
|
|
|
|
|
|
// these headers should be present by default
|
|
|
- expect(await within(card).findByText('Span Operation')).toBeInTheDocument();
|
|
|
- expect(await within(card).findByText(label)).toBeInTheDocument();
|
|
|
- expect(await within(card).findByText('Frequency')).toBeInTheDocument();
|
|
|
+ expect(await within(upper).findByText('Span Operation')).toBeInTheDocument();
|
|
|
+ expect(await within(upper).findByText(label)).toBeInTheDocument();
|
|
|
+ expect(await within(upper).findByText('Frequency')).toBeInTheDocument();
|
|
|
expect(
|
|
|
- await within(card).findByText('Total Cumulative Duration')
|
|
|
+ await within(upper).findByText('Total Exclusive Time')
|
|
|
).toBeInTheDocument();
|
|
|
|
|
|
- const arrow = await within(card).findByTestId('span-sort-arrow');
|
|
|
+ const arrow = await within(upper).findByTestId('span-sort-arrow');
|
|
|
expect(arrow).toBeInTheDocument();
|
|
|
expect(
|
|
|
await within(arrow.closest('div')!).findByText(label)
|
|
@@ -192,21 +196,21 @@ describe('Performance > Transaction Spans', function () {
|
|
|
expect(cards).toHaveLength(2);
|
|
|
for (let i = 0; i < cards.length; i++) {
|
|
|
const card = cards[i];
|
|
|
-
|
|
|
- // need to narrow the search to the upper half of the card because `Occurrences` appears in the table header as well
|
|
|
+ // need to narrow the search to the upper half of the card
|
|
|
const upper = await within(card).findByTestId('suspect-card-upper');
|
|
|
+
|
|
|
// these headers should be present by default
|
|
|
expect(await within(upper).findByText('Span Operation')).toBeInTheDocument();
|
|
|
- expect(await within(upper).findByText('p75 Duration')).toBeInTheDocument();
|
|
|
- expect(await within(upper).findByText('Occurrences')).toBeInTheDocument();
|
|
|
+ expect(await within(upper).findByText('p75 Exclusive Time')).toBeInTheDocument();
|
|
|
+ expect(await within(upper).findByText('Total Count')).toBeInTheDocument();
|
|
|
expect(
|
|
|
- await within(upper).findByText('Total Cumulative Duration')
|
|
|
+ await within(upper).findByText('Total Exclusive Time')
|
|
|
).toBeInTheDocument();
|
|
|
|
|
|
const arrow = await within(upper).findByTestId('span-sort-arrow');
|
|
|
expect(arrow).toBeInTheDocument();
|
|
|
expect(
|
|
|
- await within(arrow.closest('div')!).findByText('Occurrences')
|
|
|
+ await within(arrow.closest('div')!).findByText('Total Count')
|
|
|
).toBeInTheDocument();
|
|
|
}
|
|
|
});
|
|
@@ -225,19 +229,21 @@ describe('Performance > Transaction Spans', function () {
|
|
|
expect(cards).toHaveLength(2);
|
|
|
for (let i = 0; i < cards.length; i++) {
|
|
|
const card = cards[i];
|
|
|
+ // need to narrow the search to the upper half of the card
|
|
|
+ const upper = await within(card).findByTestId('suspect-card-upper');
|
|
|
|
|
|
// these headers should be present by default
|
|
|
- expect(await within(card).findByText('Span Operation')).toBeInTheDocument();
|
|
|
- expect(await within(card).findByText('p75 Duration')).toBeInTheDocument();
|
|
|
- expect(await within(card).findByText('Avg Occurrences')).toBeInTheDocument();
|
|
|
+ expect(await within(upper).findByText('Span Operation')).toBeInTheDocument();
|
|
|
+ expect(await within(upper).findByText('p75 Exclusive Time')).toBeInTheDocument();
|
|
|
+ expect(await within(upper).findByText('Average Count')).toBeInTheDocument();
|
|
|
expect(
|
|
|
- await within(card).findByText('Total Cumulative Duration')
|
|
|
+ await within(upper).findByText('Total Exclusive Time')
|
|
|
).toBeInTheDocument();
|
|
|
|
|
|
- const arrow = await within(card).findByTestId('span-sort-arrow');
|
|
|
+ const arrow = await within(upper).findByTestId('span-sort-arrow');
|
|
|
expect(arrow).toBeInTheDocument();
|
|
|
expect(
|
|
|
- await within(arrow.closest('div')!).findByText('Avg Occurrences')
|
|
|
+ await within(arrow.closest('div')!).findByText('Average Count')
|
|
|
).toBeInTheDocument();
|
|
|
}
|
|
|
});
|
|
@@ -261,7 +267,7 @@ describe('Performance > Transaction Spans', function () {
|
|
|
expect(await within(lower).findByText('Example Transaction')).toBeInTheDocument();
|
|
|
expect(await within(lower).findByText('Timestamp')).toBeInTheDocument();
|
|
|
expect(await within(lower).findByText('Span Duration')).toBeInTheDocument();
|
|
|
- expect(await within(lower).findByText('Occurrences')).toBeInTheDocument();
|
|
|
+ expect(await within(lower).findByText('Count')).toBeInTheDocument();
|
|
|
expect(await within(lower).findByText('Cumulative Duration')).toBeInTheDocument();
|
|
|
}
|
|
|
});
|