diff --git a/src/main/java/cc/fascinated/backend/service/PasteService.java b/src/main/java/cc/fascinated/backend/service/PasteService.java index 03a192b..984b77f 100644 --- a/src/main/java/cc/fascinated/backend/service/PasteService.java +++ b/src/main/java/cc/fascinated/backend/service/PasteService.java @@ -45,6 +45,7 @@ public class PasteService { */ public String createPaste(String content) { int length = content.length(); + long before = System.currentTimeMillis(); log.info("Creating a new paste. (characters: {})", length); // Check if the content is too large. @@ -59,7 +60,7 @@ public class PasteService { System.currentTimeMillis(), content )); - log.info("Created a new paste with the id '{}'", paste.getId()); + log.info("Created a new paste with the id '{}' (took: {}ms)", paste.getId(), System.currentTimeMillis() - before); return paste.getId(); } @@ -71,6 +72,7 @@ public class PasteService { */ public Paste getPaste(String id) { log.info("Getting paste with the id '{}'", id); + long before = System.currentTimeMillis(); Optional paste = pasteRepository.findById(id); // The paste does not exist. @@ -78,7 +80,7 @@ public class PasteService { log.info("Paste with the id '{}' not found", id); throw new ResourceNotFoundException("Paste '%s' not found".formatted(id)); } - log.info("Got paste with the id '{}'", id); + log.info("Got paste with the id '{}' (took: {}ms)", id, System.currentTimeMillis() - before); return paste.get(); } } diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 24a5670..3a4ade7 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -12,7 +12,7 @@
-
+