Skip to content

Commit 2f2affc

Browse files
committed
9_8_prepare_HW9
1 parent c3f27b7 commit 2f2affc

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
hosts {
2-
mail = "http://localhost:8080"
2+
mail {
3+
endpoint = "http://localhost:8080"
4+
debug.client = DEBUG
5+
debug.server = INFO
6+
user = "user"
7+
password = "password"
8+
}
39
}
410
include file("/apps/masterjava/config/hosts.conf")
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package ru.javaops.masterjava.web;
2+
3+
import lombok.extern.slf4j.Slf4j;
4+
5+
@Slf4j
6+
public class Statistics {
7+
public enum RESULT {
8+
SUCCESS, FAIL
9+
}
10+
11+
public static void count(String payload, long startTime, RESULT result) {
12+
long now = System.currentTimeMillis();
13+
int ms = (int) (now - startTime);
14+
log.info(payload + " " + result.name() + " execution time(ms): " + ms);
15+
// place for statistics staff
16+
17+
}
18+
}

0 commit comments

Comments
 (0)