Added logs (start/end) for tracing the project creation time

This commit is contained in:
Francesco Mangiacrapa 2024-10-04 11:52:39 +02:00
parent 138bc153a0
commit 7a7694e859
4 changed files with 116 additions and 14 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/geoportal-data-entry-app-3.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry including="**/*.java" kind="src" output="target/geoportal-data-entry-app-3.3.0/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
@ -31,5 +31,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/geoportal-data-entry-app-3.3.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/geoportal-data-entry-app-3.3.0/WEB-INF/classes"/>
</classpath>

View File

@ -1,5 +1,5 @@
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-entry-app/target/geoportal-data-entry-app-3.3.0-SNAPSHOT
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-entry-app/target/geoportal-data-entry-app-3.3.0
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
@ -165,8 +165,26 @@
<wb-module deploy-name="geoportal-data-entry-app-3.3.0-SNAPSHOT">
<wb-module deploy-name="geoportal-data-entry-app-3.3.0">
@ -333,7 +351,16 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
@ -500,7 +527,16 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
@ -667,7 +703,16 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
@ -786,10 +831,28 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="metadata-profile-form-builder-widget-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/metadata-profile-form-builder-widget/metadata-profile-form-builder-widget">
<dependent-module archiveName="metadata-profile-form-builder-widget-2.2.1.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/metadata-profile-form-builder-widget/metadata-profile-form-builder-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="uri-resolver-manager-1.8.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/uri-resolver-manager/uri-resolver-manager">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="geoportal-client-1.2.2.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-client/geoportal-client">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="geoportal-common-1.1.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-common/geoportal-common">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -956,7 +1019,16 @@
<property name="context-root" value="geoportal-data-entry-app"/>
@ -1123,7 +1195,16 @@
<property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/>
@ -1290,7 +1371,16 @@
</wb-module>

View File

@ -17,6 +17,7 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
@ -148,6 +149,9 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
List<String> stepsOnPostCreation) throws Exception {
LOG.info("saveGeonaDataForms called for profileID {}", profileID);
long startTime = System.currentTimeMillis();
LOG.info("Procedure starting at: " + startTime);
MongoServiceUtil mongoService = new MongoServiceUtil();
String theDocumentString = null;
try {
@ -231,6 +235,14 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
}
}
try {
long endDiffMillis = System.currentTimeMillis() - startTime;
long minutes = TimeUnit.MILLISECONDS.toMinutes(endDiffMillis);
LOG.info("Procedure terminated in ms: " + (endDiffMillis) + ", minutes: " + minutes);
} catch (Exception e) {
// TODO: handle exception
}
}
}