Skip to content

Commit

Permalink
Add metric to record time taken for text unit to be machine translated
Browse files Browse the repository at this point in the history
  • Loading branch information
maallen committed Sep 27, 2024
1 parent 0352256 commit 21eed01
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ public Void call(AITranslateJobInput input) throws Exception {
Tags.of("repository", repository.getName()));
}
});
meterRegistry
.timer("AITranslateJob.timeToMT", Tags.of("repository", repository.getName()))
.record(Duration.between(JSR310Migration.dateTimeNow(), pendingMT.getCreatedDate()));
} else {
// If the pending MT is expired, log an error and delete it
logger.error("Pending MT for tmTextUnitId: {} is expired", input.getTmTextUnitId());
Expand Down

0 comments on commit 21eed01

Please sign in to comment.