Skip to content

Commit

Permalink
Create logging messages for triple store ingest timing
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Woods committed Feb 24, 2020
1 parent 0f25660 commit d54e032
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.time.Duration;
import java.time.Instant;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -118,6 +121,9 @@ public void doPost(HttpServletRequest req,
? getABoxModel(getServletContext())
: ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);

Instant start = Instant.now();
log.info("Start ingest: " + start);

/* ********************* GET RDF by URL ********************** */
String RDFUrlStr = request.getParameter("rdfUrl");
if (RDFUrlStr != null && RDFUrlStr.length() > 0) {
Expand Down Expand Up @@ -225,6 +231,10 @@ public void doPost(HttpServletRequest req,
request.setAttribute("uploadDesc", "RDF upload successful.");
}

Instant end = Instant.now();
Duration total = Duration.between(start, end);
log.info("Stop ingest: " + end + ", total time: " + total);

request.setAttribute("title","Ingest RDF Data");

try {
Expand Down

0 comments on commit d54e032

Please sign in to comment.