Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saved objects (dashboard type) delete time is inconsistent #158587

Closed
dmlemeshko opened this issue May 26, 2023 · 2 comments
Closed

Saved objects (dashboard type) delete time is inconsistent #158587

dmlemeshko opened this issue May 26, 2023 · 2 comments
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc wg:performance Work tracked by the performance workgroup

Comments

@dmlemeshko
Copy link
Member

Starting April 25 we noticed a change in saved object delete_time metric for dashboard_listing_page journey:

Screenshot 2023-05-26 at 18 06 08

Afaik this metric represents how much time it takes to delete saved object (dashboard)

const deleteItems = useCallback(
async (dashboardsToDelete: Array<{ id: string }>) => {
try {
const deleteStartTime = window.performance.now();
await Promise.all(
dashboardsToDelete.map(({ id }) => {
dashboardSessionStorage.clearState(id);
return savedObjectsClient.delete(DASHBOARD_SAVED_OBJECT_TYPE, id);
})
);
const deleteDuration = window.performance.now() - deleteStartTime;
reportPerformanceMetricEvent(pluginServices.getServices().analytics, {
eventName: SAVED_OBJECT_DELETE_TIME,
duration: deleteDuration,
meta: {
saved_object_type: DASHBOARD_SAVED_OBJECT_TYPE,
total: dashboardsToDelete.length,
},
});
} catch (error) {
toasts.addError(error, {
title: dashboardListingErrorStrings.getErrorDeletingDashboardToast(),
});
}
setUnsavedDashboardIds(dashboardSessionStorage.getDashboardIdsWithUnsavedChanges());
},
[savedObjectsClient, dashboardSessionStorage, toasts]
);

Time is matching #154888 PR that splits .kibana saved objects index into multiple indices

Before the change delete_time was pretty constant taking ~600ms. After a change delete_time is not consistent taking 150-1000 ms

Scenario (delete step) is pretty simple:

.step('Delete dashboard', async ({ page }) => {
await page.click('[data-test-subj="checkboxSelectRow-edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b"]');
await page.click('[data-test-subj="deleteSelectedItems"]');
await page.click('[data-test-subj="confirmModalConfirmButton"]');
await page.waitForSelector(`[data-test-subj="table-is-ready"]`);
})

You can more information on performance dashboard

@botelastic botelastic bot added the needs-team Issues missing a team label label May 26, 2023
@dmlemeshko dmlemeshko added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc wg:performance Work tracked by the performance workgroup and removed needs-team Issues missing a team label labels May 26, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@dmlemeshko
Copy link
Member Author

Closing since metric remains within 1s limit. We adjusted alters to not track a step change, but track upper limits for both delete (1100ms) and post (600ms) operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc wg:performance Work tracked by the performance workgroup
Projects
None yet
Development

No branches or pull requests

2 participants