From f585430e87cb63b3f37486c22e9bf7789a639a72 Mon Sep 17 00:00:00 2001 From: Pierre-Charles David Date: Tue, 27 Aug 2024 10:22:24 +0200 Subject: [PATCH] [cleanup] Only include the actual refresh time in TIMER_REFRESH_REPRESENTATION Signed-off-by: Pierre-Charles David --- .../editingcontext/EditingContextEventProcessor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/editingcontext/EditingContextEventProcessor.java b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/editingcontext/EditingContextEventProcessor.java index ee1632c212..a148f2757f 100644 --- a/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/editingcontext/EditingContextEventProcessor.java +++ b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/editingcontext/EditingContextEventProcessor.java @@ -171,13 +171,14 @@ private Disposable setupChangeDescriptionSinkConsumer() { } this.refreshOtherRepresentations(changeDescription); + var timer = this.meterRegistry.timer(Monitoring.TIMER_REFRESH_REPRESENTATION, "changeDescription", changeDescription.getSourceId()); + refreshRepresentationSample.stop(timer); + if (this.shouldPersistTheEditingContext(changeDescription)) { this.editingContextPersistenceService.persist(this.editingContext); } this.danglingRepresentationDeletionService.deleteDanglingRepresentations(this.editingContext); - var timer = this.meterRegistry.timer(Monitoring.TIMER_REFRESH_REPRESENTATION, "changeDescription", changeDescription.getSourceId()); - refreshRepresentationSample.stop(timer); }; Consumer errorConsumer = throwable -> this.logger.warn(throwable.getMessage(), throwable);