diff --git a/src/Main.java b/src/Main.java index 4cc3b16..19dfcb0 100644 --- a/src/Main.java +++ b/src/Main.java @@ -23,8 +23,5 @@ public static void main(String[] args) { methodProfiles.forEach(mp -> System.out.println(mp.toString())); } - //String test = "C:\\Users\\SBT-Kovalev-DA\\logg.log"; - //String givenTest = "C:\\Users\\SBT-Kovalev-DA\\Downloads\\test\\testlog.log"; - } } diff --git a/src/model/Event.java b/src/model/Event.java index 4a10d69..2cf107f 100644 --- a/src/model/Event.java +++ b/src/model/Event.java @@ -33,5 +33,4 @@ public String getMethodName() { public long getInvocationId() { return invocationId; } - } diff --git a/src/model/MethodInvocation.java b/src/model/MethodInvocation.java index ec7e486..9998aa6 100644 --- a/src/model/MethodInvocation.java +++ b/src/model/MethodInvocation.java @@ -1,7 +1,6 @@ package model; import java.util.Date; -import java.util.concurrent.TimeUnit; /** * Created by SBT-Kovalev-DA on 19.03.2016. @@ -22,7 +21,7 @@ public static MethodInvocation ofEvents(Event start, Event end) { } private static long getDateDiff(Date start, Date end) { - return end.getTime() - start.getTime();//TimeUnit.MILLISECONDS.toMillis(diffInMillies); + return end.getTime() - start.getTime(); } diff --git a/src/service/LogEventParserImpl.java b/src/service/LogEventParserImpl.java index ca62de6..cf2a38d 100644 --- a/src/service/LogEventParserImpl.java +++ b/src/service/LogEventParserImpl.java @@ -13,14 +13,12 @@ import java.util.ArrayList; import java.util.List; -import static java.lang.Integer.valueOf; - /** * Created by SBT-Kovalev-DA on 19.03.2016. */ public class LogEventParserImpl implements EventParser { private static final String SEPARATOR = " "; - private final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss,SSS"); + private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss,SSS"); @Override public List parseEvents(String fileName) { diff --git a/src/service/ProfileFromEventsExtractor.java b/src/service/ProfileFromEventsExtractor.java index c68fb54..1140dac 100644 --- a/src/service/ProfileFromEventsExtractor.java +++ b/src/service/ProfileFromEventsExtractor.java @@ -1,11 +1,9 @@ package service; import model.Event; -import model.MethodInvocation; import model.MethodProfile; import java.util.List; -import java.util.Map; /** * Created by SBT-Kovalev-DA on 19.03.2016. diff --git a/src/service/ProfileFromEventsExtractorImpl.java b/src/service/ProfileFromEventsExtractorImpl.java index f3932ba..b901f50 100644 --- a/src/service/ProfileFromEventsExtractorImpl.java +++ b/src/service/ProfileFromEventsExtractorImpl.java @@ -13,7 +13,6 @@ import static java.util.stream.Collectors.groupingBy; import static java.util.stream.Collectors.toList; -import static java.util.stream.Collectors.toMap; import static model.EventType.ENTRY; import static model.EventType.EXIT; import static model.MethodInvocation.ofEvents;