geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vfor...@apache.org
Subject [1/5] incubator-geode git commit: GEODE-340 Deleting old code
Date Wed, 25 Nov 2015 23:33:19 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-78 f29845a0c -> fb4de6a3c


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b9e0d9c0/jvsdfx-mm/src/main/java/com/pivotal/jvsd/stats/StatFileWrapper.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/com/pivotal/jvsd/stats/StatFileWrapper.java b/jvsdfx-mm/src/main/java/com/pivotal/jvsd/stats/StatFileWrapper.java
deleted file mode 100644
index a0dbd91..0000000
--- a/jvsdfx-mm/src/main/java/com/pivotal/jvsd/stats/StatFileWrapper.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.pivotal.jvsd.stats;
-
-import com.pivotal.jvsd.stats.StatFileParser.ArchiveInfo;
-import com.pivotal.jvsd.stats.StatFileParser.ResourceInst;
-import com.pivotal.jvsd.stats.StatFileParser.StatArchiveFile;
-import com.pivotal.jvsd.stats.StatFileParser.StatValue;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- *
- * @author Vince Ford
- */
-public class StatFileWrapper {
-
-	File file = null;
-	boolean processed = false;
-	ArchiveInfo aInfo = null;
-	HashMap<String, ResourceInst> resources = null;
-
-	public ResourceInst getResource(String type, String name) {
-		String key = type + name;
-		return resources.get(key);
-
-	}
-
-	public StatFileWrapper(File file) {
-		try {
-			this.file = file;
-			File[] files = new File[1];
-			files[0] = file;
-			resources = new HashMap<String, ResourceInst>();
-			StatFileParser sar = new StatFileParser(files, null, false);
-			List<ResourceInst> resourceList = sar.getResourceInstList();
-			for (ResourceInst ri : resourceList) {
-				String key = ri.getType().getName() + ri.getName();
-				resources.put(key, ri);
-			}
-			StatArchiveFile[] sa = sar.getArchives();
-			aInfo = sa[0].getArchiveInfo();
-
-		} catch (IOException ex) {
-			Logger.getLogger(StatFileWrapper.class.getName()).
-							log(Level.SEVERE, null, ex);
-		}
-	}
-
-	public StatFileWrapper(String filepath) {
-		file = new File(filepath);
-	}
-
-	public ArchiveInfo getaInfo() {
-		return aInfo;
-	}
-
-	public List<ResourceInst> getResourceList() {
-		ArrayList<ResourceInst> list = new ArrayList<ResourceInst>(resources.
-						values());
-		return list;
-	}
-
-	public boolean isProcessed() {
-		return processed;
-	}
-
-	public void setProcessed(boolean processed) {
-		this.processed = processed;
-	}
-
-	public File getFile() {
-		return file;
-	}
-
-	public List<String> getStats(String typeName, String name, boolean hideZeros) {
-		String key = typeName + name;
-		ResourceInst ri = resources.get(key);
-		ArrayList<String> statNames = new ArrayList<String>();
-		for (StatValue sv : ri.getStatValues()) {
-			if (!(sv.getSnapshotsAverage() == 0 && sv.getSnapshotsMaximum() == 0 &&
sv.
-							getSnapshotsMinimum() == 0)) {
-				statNames.add(sv.getDescriptor().getName());
-			}
-		}
-		Collections.sort(statNames);
-		return statNames;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b9e0d9c0/jvsdfx-mm/src/main/java/com/pivotal/jvsd/stats/Utility.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/com/pivotal/jvsd/stats/Utility.java b/jvsdfx-mm/src/main/java/com/pivotal/jvsd/stats/Utility.java
index 4fe0d4b..34a5ee7 100644
--- a/jvsdfx-mm/src/main/java/com/pivotal/jvsd/stats/Utility.java
+++ b/jvsdfx-mm/src/main/java/com/pivotal/jvsd/stats/Utility.java
@@ -76,8 +76,8 @@ public class Utility {
 		return ((value - value2) / ((timestamp - timestamp2) / 1000));
 	}
 
-	public static void dumpCharts(List<StatFileParser.ResourceInst> ril) {
-		logger.info("Dumping Charts");
+//	public static void dumpCharts(List<StatFileParser.ResourceInst> ril) {
+//		logger.info("Dumping Charts");
 //		for (StatFileParser.ResourceInst o : ril) {
 //			logger.fine("RESOURCE:" + o.getType().getName() + o.getName() + "," + o.
 //							toString());
@@ -141,89 +141,89 @@ public class Utility {
 //				}
 //			}
 //		}
-		logger.info("Finished Charts");
-	}
-
-	static public void dumpCSV(StatFileManager sfm, File file) {
-		int numFiles = sfm.length();
-		try {
-			System.out.println("Writing CSV file: " + file.getAbsolutePath());
-			file.createNewFile();
-			PrintWriter pw = new PrintWriter(file);
-			for (int x = 0; x < numFiles; x++) {
-				StatFileWrapper sfWrapper = sfm.getFile(x);
-				StatFileParser.ArchiveInfo aInfo = sfWrapper.getaInfo();
-				pw.print("FILE INFO, ");
-				pw.print(aInfo.getArchiveFileName() + ", ");
-				pw.print(aInfo.getMachine() + ", ");
-				pw.print(aInfo.getOs() + ", ");
-				pw.print(aInfo.getProductVersion() + ", ");
-				pw.print(aInfo.getStartTimeMillis() + ", ");
-				pw.print(aInfo.getSystem() + ", ");
-				pw.print(aInfo.getSystemId() + ", ");
-				pw.print(aInfo.getSystemStartTimeMillis() + ", ");
-				pw.print(aInfo.getTimeZone());
-				pw.println();
-				pw.flush();
-				List<StatFileParser.ResourceInst> rl = sfWrapper.getResourceList();
-				for (StatFileParser.ResourceInst ri : rl) {
-					pw.print("STATTYPE, ");
-					pw.print(ri.getType().getName() + ", ");
-					pw.print(ri.getName());
-					pw.println();
-					StatFileParser.StatValue[] svArray = ri.getStatValues();
-					for (StatFileParser.StatValue sv : svArray) {
-						pw.print("STAT, ");
-						pw.print(sv.getDescriptor().getName() + ", ");
-						if (sv.getFilter() == sv.FILTER_NONE) {
-							pw.print("NO FILTER, ");
-						} else {
-							if (sv.getFilter() == sv.FILTER_PERSAMPLE) {
-								pw.print("PERSAMPLE FILTER, ");
-							} else {
-								if (sv.getFilter() == sv.FILTER_PERSEC) {
-									pw.print("PERSECOND FILTER, ");
-								}
-							}
-						}
-						pw.println();
-						pw.print("TIME, ");
-						long[] timesnapshot = sv.getRawAbsoluteTimeStamps();
-						for (long time : timesnapshot) {
-							pw.print(time);
-							pw.print(", ");
-						}
-						pw.println();
-						pw.print("DATA, ");
-						double[] datasnapshot = sv.getRawSnapshots();
-						for (double data : datasnapshot) {
-							pw.print(data);
-							pw.print(", ");
-						}
-						pw.println();
-					}
-					pw.println();
-					pw.flush();
-				}
-				pw.close();
-			}
-			System.out.println("Finished writing CSV file: " + file.getAbsolutePath());
-		} catch (IOException ex) {
-			Logger.getLogger(Utility.class.getName()).log(Level.SEVERE, null, ex);
-		}
-
-	}
+//		logger.info("Finished Charts");
+//	}
 
-	static public JMenu createMenu(String menuName, JMenuBar menubar) {
-		JMenu menu = new JMenu(menuName);
-		menubar.add(menu);
-		return menu;
-	}
-
-	static public JMenuItem createMenuItem(String menuItem, JMenu menu, ActionListener al) {
-		JMenuItem mi = new JMenuItem(menuItem);
-		mi.addActionListener(al);
-		menu.add(mi);
-		return mi;
-	}
+//	static public void dumpCSV(StatFileManager sfm, File file) {
+//		int numFiles = sfm.length();
+//		try {
+//			System.out.println("Writing CSV file: " + file.getAbsolutePath());
+//			file.createNewFile();
+//			PrintWriter pw = new PrintWriter(file);
+//			for (int x = 0; x < numFiles; x++) {
+//				StatFileWrapper sfWrapper = sfm.getFile(x);
+//				StatFileParser.ArchiveInfo aInfo = sfWrapper.getaInfo();
+//				pw.print("FILE INFO, ");
+//				pw.print(aInfo.getArchiveFileName() + ", ");
+//				pw.print(aInfo.getMachine() + ", ");
+//				pw.print(aInfo.getOs() + ", ");
+//				pw.print(aInfo.getProductVersion() + ", ");
+//				pw.print(aInfo.getStartTimeMillis() + ", ");
+//				pw.print(aInfo.getSystem() + ", ");
+//				pw.print(aInfo.getSystemId() + ", ");
+//				pw.print(aInfo.getSystemStartTimeMillis() + ", ");
+//				pw.print(aInfo.getTimeZone());
+//				pw.println();
+//				pw.flush();
+//				List<StatFileParser.ResourceInst> rl = sfWrapper.getResourceList();
+//				for (StatFileParser.ResourceInst ri : rl) {
+//					pw.print("STATTYPE, ");
+//					pw.print(ri.getType().getName() + ", ");
+//					pw.print(ri.getName());
+//					pw.println();
+//					StatFileParser.StatValue[] svArray = ri.getStatValues();
+//					for (StatFileParser.StatValue sv : svArray) {
+//						pw.print("STAT, ");
+//						pw.print(sv.getDescriptor().getName() + ", ");
+//						if (sv.getFilter() == sv.FILTER_NONE) {
+//							pw.print("NO FILTER, ");
+//						} else {
+//							if (sv.getFilter() == sv.FILTER_PERSAMPLE) {
+//								pw.print("PERSAMPLE FILTER, ");
+//							} else {
+//								if (sv.getFilter() == sv.FILTER_PERSEC) {
+//									pw.print("PERSECOND FILTER, ");
+//								}
+//							}
+//						}
+//						pw.println();
+//						pw.print("TIME, ");
+//						long[] timesnapshot = sv.getRawAbsoluteTimeStamps();
+//						for (long time : timesnapshot) {
+//							pw.print(time);
+//							pw.print(", ");
+//						}
+//						pw.println();
+//						pw.print("DATA, ");
+//						double[] datasnapshot = sv.getRawSnapshots();
+//						for (double data : datasnapshot) {
+//							pw.print(data);
+//							pw.print(", ");
+//						}
+//						pw.println();
+//					}
+//					pw.println();
+//					pw.flush();
+//				}
+//				pw.close();
+//			}
+//			System.out.println("Finished writing CSV file: " + file.getAbsolutePath());
+//		} catch (IOException ex) {
+//			Logger.getLogger(Utility.class.getName()).log(Level.SEVERE, null, ex);
+//		}
+//
+//	}
+//
+//	static public JMenu createMenu(String menuName, JMenuBar menubar) {
+//		JMenu menu = new JMenu(menuName);
+//		menubar.add(menu);
+//		return menu;
+//	}
+//
+//	static public JMenuItem createMenuItem(String menuItem, JMenu menu, ActionListener al)
{
+//		JMenuItem mi = new JMenuItem(menuItem);
+//		mi.addActionListener(al);
+//		menu.add(mi);
+//		return mi;
+//	}
 }


Mime
View raw message