This is an automated email from the ASF dual-hosted git repository.
arnabp20 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/master by this push:
new 0d5e94a [SYSTEMDS-2755] Minor bug fixes for Lineage Estimator
0d5e94a is described below
commit 0d5e94ace91b9883f9e64d3156ae405a6b3c4bea
Author: arnabp <[email protected]>
AuthorDate: Sun Dec 13 19:26:57 2020 +0100
[SYSTEMDS-2755] Minor bug fixes for Lineage Estimator
---
.../org/apache/sysds/runtime/lineage/LineageEstimatorStatistics.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/src/main/java/org/apache/sysds/runtime/lineage/LineageEstimatorStatistics.java
b/src/main/java/org/apache/sysds/runtime/lineage/LineageEstimatorStatistics.java
index f6db467..1f6bb11 100644
---
a/src/main/java/org/apache/sysds/runtime/lineage/LineageEstimatorStatistics.java
+++
b/src/main/java/org/apache/sysds/runtime/lineage/LineageEstimatorStatistics.java
@@ -26,7 +26,7 @@ import org.apache.sysds.utils.Statistics;
public class LineageEstimatorStatistics {
private static final LongAdder _ctimeSaved = new LongAdder(); //in
nano sec
- private static int maxInsts = 10;
+ private static int INSTCOUNT = 10;
public static void reset() {
_ctimeSaved.reset();
@@ -61,7 +61,8 @@ public class LineageEstimatorStatistics {
// Total time saved and reuse counts per opcode, ordered by
saved time
StringBuilder sb = new StringBuilder();
sb.append("# Instrunction\t" + " "+"Time(s) Count \n");
- for (int i=1; i<=maxInsts; i++) {
+ int instCount = Math.min(INSTCOUNT,
LineageEstimator.computeSavingInst.size());
+ for (int i=1; i<=instCount; i++) {
MutableTriple<String, Long, Double> op =
LineageEstimator.computeSavingInst.poll();
int tl =
String.valueOf(op.getRight()*1e-3).indexOf(".");
if (op != null && op.getRight() > 0)