Index: /DCWoRMS/branches/coolemall/src/simulator/stats/implementation/out/StringSerializer.java
===================================================================
--- /DCWoRMS/branches/coolemall/src/simulator/stats/implementation/out/StringSerializer.java	(revision 805)
+++ /DCWoRMS/branches/coolemall/src/simulator/stats/implementation/out/StringSerializer.java	(revision 914)
@@ -261,5 +261,5 @@
 	public Object visit(ResourceUsageStats resourceUsageStats) {
 		Map<Long, Double> resourceUsage = resourceUsageStats.getHistory();
-		
+		String metricName = "utlization";
 		int mapSize = resourceUsage.size();
 		/*
@@ -284,10 +284,10 @@
 			buffer = new StringBuffer(size + 42);
 			String[] headers = resourceUsageStats.getHeaders();
-			for(int i = 0; i < headers.length; i++)
-			{
-				buffer.append(headers[i]);
-				buffer.append(fieldSeparator);
-			}
-			buffer.append(System.getProperty("line.separator"));
+			/*for(int i = 0; i < headers.length; i++)
+			{
+				buffer.append(headers[i]);
+				buffer.append(fieldSeparator);
+			}
+			buffer.append(System.getProperty("line.separator"));*/
 		} else {
 			buffer = new StringBuffer(size);
@@ -297,4 +297,6 @@
 		for (Long timestamp : resourceUsage.keySet()) {
 			
+			buffer.append(metricName);
+			buffer.append(fieldSeparator);
 			buffer.append(resourceUsageStats.getResourceName());
 			buffer.append(fieldSeparator);
@@ -308,7 +310,12 @@
 
 		}
+		
+		int lastIdx = buffer.lastIndexOf(System.getProperty("line.separator"));
+		if(lastIdx != -1)
+			buffer.deleteCharAt(lastIdx);
+		
 		if(resourceUsage.size() > 0){
-			buffer.append("mean: " + resourceUsageStats.getMeanValue());
-			buffer.append(System.getProperty("line.separator"));	
+			//uffer.append("mean: " + resourceUsageStats.getMeanValue());
+			//buffer.append(System.getProperty("line.separator"));	
 		}
 		return buffer.toString();
@@ -317,5 +324,5 @@
 	public Object visit(ResourcePowerStats resourceEnergyStats) {
 		Map<Long, Double> resourceEnergy = resourceEnergyStats.getHistory();
-		
+		String metricName = "powerConsumption";
 		int mapSize = resourceEnergy.size();
 		/*
@@ -340,10 +347,10 @@
 			buffer = new StringBuffer(size + 42);
 			String[] headers = resourceEnergyStats.getHeaders();
-			for(int i = 0; i < headers.length; i++)
-			{
-				buffer.append(headers[i]);
-				buffer.append(fieldSeparator);
-			}
-			buffer.append(System.getProperty("line.separator"));
+			/*for(int i = 0; i < headers.length; i++)
+			{
+				buffer.append(headers[i]);
+				buffer.append(fieldSeparator);
+			}
+			buffer.append(System.getProperty("line.separator"));*/
 		} else {
 			buffer = new StringBuffer(size);
@@ -353,4 +360,6 @@
 		for (Long timestamp : resourceEnergy.keySet()) {
 			
+			buffer.append(metricName);
+			buffer.append(fieldSeparator);
 			buffer.append(resourceEnergyStats.getResourceName());
 			buffer.append(fieldSeparator);
@@ -365,7 +374,11 @@
 		}
 		
+		int lastIdx = buffer.lastIndexOf(System.getProperty("line.separator"));
+		if(lastIdx != -1)
+			buffer.deleteCharAt(lastIdx);
+		
 		if(resourceEnergy.size() > 0) {
-			buffer.append("mean: "+resourceEnergyStats.getMeanValue() + " sum: " +resourceEnergyStats.getSumValue());
-			buffer.append(System.getProperty("line.separator"));	
+			//buffer.append("mean: "+resourceEnergyStats.getMeanValue() + " sum: " +resourceEnergyStats.getSumValue());
+			//buffer.append(System.getProperty("line.separator"));	
 		}
 
@@ -375,5 +388,5 @@
 	public Object visit(ResourceAirFlowStats resourceAirFlowStats) {
 		Map<Long, Double> resourceAirFlow = resourceAirFlowStats.getHistory();
-		
+		String metricName = "airFlow";
 		int mapSize = resourceAirFlow.size();
 		/*
@@ -398,10 +411,10 @@
 			buffer = new StringBuffer(size + 42);
 			String[] headers = resourceAirFlowStats.getHeaders();
-			for(int i = 0; i < headers.length; i++)
-			{
-				buffer.append(headers[i]);
-				buffer.append(fieldSeparator);
-			}
-			buffer.append(System.getProperty("line.separator"));
+			/*for(int i = 0; i < headers.length; i++)
+			{
+				buffer.append(headers[i]);
+				buffer.append(fieldSeparator);
+			}
+			buffer.append(System.getProperty("line.separator"));*/
 		} else {
 			buffer = new StringBuffer(size);
@@ -411,4 +424,6 @@
 		for (Long timestamp : resourceAirFlow.keySet()) {
 			
+			buffer.append(metricName);
+			buffer.append(fieldSeparator);
 			buffer.append(resourceAirFlowStats.getResourceName());
 			buffer.append(fieldSeparator);
@@ -422,8 +437,11 @@
 
 		}
+		int lastIdx = buffer.lastIndexOf(System.getProperty("line.separator"));
+		if(lastIdx != -1)
+			buffer.deleteCharAt(lastIdx);
 		
 		if(resourceAirFlow.size() > 0) {
-			buffer.append("mean: "+resourceAirFlowStats.getMeanValue() + " sum: " +resourceAirFlowStats.getSumValue());
-			buffer.append(System.getProperty("line.separator"));	
+			//buffer.append("mean: "+resourceAirFlowStats.getMeanValue() + " sum: " +resourceAirFlowStats.getSumValue());
+			//buffer.append(System.getProperty("line.separator"));	
 		}
 
@@ -433,5 +451,5 @@
 	public Object visit(ResourceTemperatureStats resourceTemperatureStats) {
 		Map<Long, Double> resourceTemperature = resourceTemperatureStats.getHistory();
-		
+		String metricName = "temperature";
 		int mapSize = resourceTemperature.size();
 		/*
@@ -455,5 +473,5 @@
 		if(printedHeaders.add(resourceTemperatureStats.getUsageType())) {
 			buffer = new StringBuffer(size + 42);
-			String[] headers = resourceTemperatureStats.getHeaders();
+			/*String[] headers = resourceTemperatureStats.getHeaders();
 			for(int i = 0; i < headers.length; i++)
 			{
@@ -461,5 +479,5 @@
 				buffer.append(fieldSeparator);
 			}
-			buffer.append(System.getProperty("line.separator"));
+			buffer.append(System.getProperty("line.separator"));*/
 		} else {
 			buffer = new StringBuffer(size);
@@ -469,4 +487,6 @@
 		for (Long timestamp : resourceTemperature.keySet()) {
 			
+			buffer.append(metricName);
+			buffer.append(fieldSeparator);
 			buffer.append(resourceTemperatureStats.getResourceName());
 			buffer.append(fieldSeparator);
@@ -481,7 +501,11 @@
 		}
 		
+		int lastIdx = buffer.lastIndexOf(System.getProperty("line.separator"));
+		if(lastIdx != -1)
+			buffer.deleteCharAt(lastIdx);
+		
 		if(resourceTemperature.size() > 0) {
-			buffer.append("mean: "+resourceTemperatureStats.getMeanValue() + " sum: " +resourceTemperatureStats.getSumValue());
-			buffer.append(System.getProperty("line.separator"));	
+			//buffer.append("mean: "+resourceTemperatureStats.getMeanValue() + " sum: " +resourceTemperatureStats.getSumValue());
+			//buffer.append(System.getProperty("line.separator"));	
 		}
 
