Skip to content

Commit

Permalink
feat(objectionary#834): add a bit of logging
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Nov 12, 2024
1 parent 7b24b10 commit d75f685
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/it/jna/invoker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
# Just to compare, the 'short' path takes 13 seconds to run, while the 'full' path
# takes 31 minutes.
invoker.goals=clean verify -e -B
invoker.profiles=full
invoker.profiles=short
12 changes: 11 additions & 1 deletion src/main/java/org/eolang/jeo/representation/CanonicalXmir.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.eolang.jeo.representation;

import com.jcabi.log.Logger;
import com.jcabi.xml.XML;
import com.jcabi.xml.XMLDocument;
import com.yegor256.xsline.Shift;
Expand Down Expand Up @@ -127,7 +128,16 @@ private String toEo() {
* @throws IOException If fails.
*/
private XML parse(final String eoprog) throws IOException {
return new EoSyntax(this.name, new InputOf(eoprog)).parsed();
final long start = System.currentTimeMillis();
final XML parsed = new EoSyntax(this.name, new InputOf(eoprog)).parsed();
final long end = System.currentTimeMillis();
Logger.info(
this,
"We need to parse XMIR by using EoSyntax#parsed to make unrolling. The '%s' was parsed in %[ms]s",
this.name,
end - start
);
return parsed;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,4 @@ void unrollsSequenceOfValuesCorrectly() {
)
);
}

@Test
void unrollesRealFile() throws Exception {
new CanonicalXmir(
new XMLDocument(
new ResourceOf("xmir/Native.xmir").stream())
).plain();
}

}

0 comments on commit d75f685

Please sign in to comment.