Skip to content

Commit

Permalink
Added some timing information about the duration a mapping takes
Browse files Browse the repository at this point in the history
  • Loading branch information
aljoshakoecher committed Dec 4, 2021
1 parent 3498b6e commit ee15288
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/src/main/java/mapping/MtpToSkillMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ public class MtpToSkillMapper {
* @return Skill ontology in turtle syntax
*/
public String executeMapping(String mtpFilePath) {


System.out.println("Started mapping of " + mtpFilePath);
long start = System.currentTimeMillis();

// 1. Execute RML mapping
RmlMapper rmlMapper = new RmlMapper();
String rmlMappingResult = rmlMapper.executeRmlMapping(mtpFilePath);
Expand All @@ -42,6 +45,10 @@ public String executeMapping(String mtpFilePath) {

// 3. Combine rml mapping result with state machines
String mappingResult = rmlMappingResult + "\n" + stateMachines;

long end = System.currentTimeMillis();
long mappingDuration = (end - start) / 1000;
System.out.println("Finished mapping in " + mappingDuration + " seconds.");
return mappingResult;
}

Expand Down

0 comments on commit ee15288

Please sign in to comment.