This is an automated email from the ASF dual-hosted git repository.

baunsgaard 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 81d0e95  [MINOR] Compression stats only if used
81d0e95 is described below

commit 81d0e95b0ad59dd0a9ee2635b4ce40a6b9376bd6
Author: baunsgaard <[email protected]>
AuthorDate: Fri Jan 29 13:53:51 2021 +0100

    [MINOR] Compression stats only if used
---
 .../sysds/utils/DMLCompressionStatistics.java      | 31 +++++++++++-----------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/src/main/java/org/apache/sysds/utils/DMLCompressionStatistics.java 
b/src/main/java/org/apache/sysds/utils/DMLCompressionStatistics.java
index 606539b..cb8031e 100644
--- a/src/main/java/org/apache/sysds/utils/DMLCompressionStatistics.java
+++ b/src/main/java/org/apache/sysds/utils/DMLCompressionStatistics.java
@@ -77,20 +77,21 @@ public class DMLCompressionStatistics {
        }
 
        public static void display(StringBuilder sb) {
-               
-               sb.append(String.format(
-                       "CLA Compression Phases 
:\t%.3f/%.3f/%.3f/%.3f/%.3f/%.3f\n",
-                       Phase0 / 1000,
-                       Phase1 / 1000,
-                       Phase2 / 1000,
-                       Phase3 / 1000,
-                       Phase4 / 1000,
-                       Phase5 / 1000));
-               sb.append(String.format("Decompression Counts (Single , Multi) 
thread                     :\t%d/%d\n",
-                       DecompressSTCount,
-                       DecompressMTCount));
-               sb.append(String.format("Dedicated Decompression Time (Single , 
Multi) thread             :\t%.3f/%.3f\n",
-                       DecompressST / 1000,
-                       DecompressMT / 1000));
+               if(Phase0 > 0.0){ //  If compression have been used
+                       sb.append(String.format(
+                               "CLA Compression Phases 
:\t%.3f/%.3f/%.3f/%.3f/%.3f/%.3f\n",
+                               Phase0 / 1000,
+                               Phase1 / 1000,
+                               Phase2 / 1000,
+                               Phase3 / 1000,
+                               Phase4 / 1000,
+                               Phase5 / 1000));
+                       sb.append(String.format("Decompression Counts (Single , 
Multi) thread                     :\t%d/%d\n",
+                               DecompressSTCount,
+                               DecompressMTCount));
+                       sb.append(String.format("Dedicated Decompression Time 
(Single , Multi) thread             :\t%.3f/%.3f\n",
+                               DecompressST / 1000,
+                               DecompressMT / 1000));
+               }
        }
 }

Reply via email to