[Title] change cpu chart string, modify to use ' ,...' log
authorsanghyunnim.lee <sanghyunnim.lee@samsung.com>
Wed, 27 Jun 2012 04:22:52 +0000 (13:22 +0900)
committersanghyunnim.lee <sanghyunnim.lee@samsung.com>
Wed, 27 Jun 2012 04:22:52 +0000 (13:22 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelineChartLables.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/timeline/chart/CPUChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/timeline/chart/CPUCoreChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/timeline/chart/CPUFrequencyChart.java

index 142be03..ef638d3 100644 (file)
@@ -1,5 +1,5 @@
-CPU_CHART_SERIES_NAME_APP_LOAD=App. Load
-CPU_CHART_SERIES_NAME_TOTLA_LOAD=Total Load
+CPU_CHART_SERIES_NAME_APP_LOAD=App.
+CPU_CHART_SERIES_NAME_TOTLA_LOAD=Total
 
 CPU_CHART_TIME=Time
 CPU_CHART_TITLE=CPU
index ad23f1a..9309d6e 100644 (file)
@@ -201,7 +201,7 @@ public class CPUChart extends TimelineChart {
                        try {
                                time = (long)Double.parseDouble(log.get(LogCenterConstants.DEVICE_TIME_INDEX)) / TimelineConstants.TIME_US_TO_MS / TimelineConstants.TIME_US_TO_MS;
                                String[] cpuRates = log.get(LogCenterConstants.DEVICE_SYSTEM_CPU_USAGE_INDEX).split(","); //$NON-NLS-1$
-                               systemAvgLoad = Double.parseDouble(cpuRates[cpuRates.length - 1]);
+                               systemAvgLoad = Double.parseDouble(cpuRates[cpuRates.length - 1].trim());
                        } catch (NumberFormatException ne) {
                                ne.printStackTrace();
                        } catch (NullPointerException ne) {
index 803896d..1aba1a0 100644 (file)
@@ -244,7 +244,7 @@ public class CPUCoreChart extends TimelineChart {
                                }
                                
                                for(int i = 0; i < coreSize; i++) {
-                                       coreInfos[i].newXYDataItems.add(new XYDataItem(time, Double.parseDouble(cpuRates[i])));
+                                       coreInfos[i].newXYDataItems.add(new XYDataItem(time, Double.parseDouble(cpuRates[i].trim())));
                                }
                        } catch (NumberFormatException ne) {
                                ne.printStackTrace();
index 50136cf..f21ebf1 100644 (file)
@@ -147,7 +147,7 @@ public class CPUFrequencyChart extends TimelineChart {
                        try {
                                time = Double.parseDouble(log.get(LogCenterConstants.DEVICE_TIME_INDEX)) / TimelineConstants.TIME_US_TO_MS / TimelineConstants.TIME_US_TO_MS;
                                String[] cpuFreqs = log.get(LogCenterConstants.DEVICE_CPU_FREQUENCY_INDEX).split(","); //$NON-NLS-1$
-                               freq1 = Double.parseDouble(cpuFreqs[0]);
+                               freq1 = Double.parseDouble(cpuFreqs[0].trim());
                        } catch (NumberFormatException ne) {
                                ne.printStackTrace();
                        } catch (NullPointerException ne) {