Skip to content

Commit

Permalink
[cleanup] Only include the actual refresh time in TIMER_REFRESH_REPRE…
Browse files Browse the repository at this point in the history
…SENTATION

Signed-off-by: Pierre-Charles David <[email protected]>
  • Loading branch information
pcdavid authored and sbegaudeau committed Aug 28, 2024
1 parent 66e73fd commit f585430
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Throwable> errorConsumer = throwable -> this.logger.warn(throwable.getMessage(), throwable);
Expand Down

0 comments on commit f585430

Please sign in to comment.