Skip to content

Commit

Permalink
Switch parser summary to stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Feb 16, 2024
1 parent fa9ae3e commit ee541a9
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions core/src/main/java/org/jruby/management/ParserStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,26 +88,26 @@ public void addPrismTimeCParseSerialize(long time) {
}

public void printParserStatistics() {
System.out.println("--------------------------------------------------------------------------------");
System.out.println("Parser Statistics:");
System.out.println(" Generic:");
System.out.println(" parser type: " + (ParserManager.PARSER_WASM ? "Prism(wasm)" :
System.err.println("--------------------------------------------------------------------------------");
System.err.println("Parser Statistics:");
System.err.println(" Generic:");
System.err.println(" parser type: " + (ParserManager.PARSER_WASM ? "Prism(wasm)" :
(Options.PARSER_PRISM.load() ? "Prism(C)" : "Legacy")));
System.out.println(" bytes processed: " + getTotalParsedBytes());
System.out.println(" files parsed: " + getNumberOfLoadParses());
System.out.println(" evals parsed: " + getNumberOfEvalParses());
System.out.println(" time spent parsing(s): " + getTotalParseTime());
System.out.println(" time spend parsing + building: " + (getTotalParseTime() + getIRBuildTime()));
System.err.println(" bytes processed: " + getTotalParsedBytes());
System.err.println(" files parsed: " + getNumberOfLoadParses());
System.err.println(" evals parsed: " + getNumberOfEvalParses());
System.err.println(" time spent parsing(s): " + getTotalParseTime());
System.err.println(" time spend parsing + building: " + (getTotalParseTime() + getIRBuildTime()));
if (Options.PARSER_PRISM.load()) {
System.out.println(" Prism:");
System.out.println(" time C parse+serialize: " + getPrismCParseSerializeTime());
System.out.println(" time deserializing: " + getPrismDeserializingTime());
System.out.println(" serialized bytes: " + getTotalPrismSerializedBytes());
System.out.println(" serialized to source ratio: x" +
System.err.println(" Prism:");
System.err.println(" time C parse+serialize: " + getPrismCParseSerializeTime());
System.err.println(" time deserializing: " + getPrismDeserializingTime());
System.err.println(" serialized bytes: " + getTotalPrismSerializedBytes());
System.err.println(" serialized to source ratio: x" +
((float) getTotalPrismSerializedBytes() / getTotalParsedBytes()));
}
System.out.println(" IRBuild:");
System.out.println(" build time: " + getIRBuildTime());
System.err.println(" IRBuild:");
System.err.println(" build time: " + getIRBuildTime());
}

private double getIRBuildTime() {
Expand Down

0 comments on commit ee541a9

Please sign in to comment.