private static int getSqlHash(String sql) { if (sql.length() < 100) return HashUtil.hash(sql); int id = sql.hashCode(); int hash = sqlHash.get(id); if (hash == 0) { hash = HashUtil.hash(sql); sqlHash.put(id, hash); } return hash; } private static IntLinkedSet sqlText = new IntLinkedSet().setMax(10000);
public synchronized void sort(Comparator<IntIntLinkedEntry> c){ ArrayList<IntIntLinkedEntry> list = new ArrayList<IntIntLinkedEntry>(this.size()); Enumeration<IntIntLinkedEntry> en = this.entries(); while(en.hasMoreElements()){ list.add(en.nextElement()); } Collections.sort(list, c); this.clear(); for(int i = 0 ; i<list.size() ; i++){ IntIntLinkedEntry e = list.get(i); this.put(e.getKey(), e.getValue()); } } }
public synchronized void sort(Comparator<IntIntLinkedEntry> c){ ArrayList<IntIntLinkedEntry> list = new ArrayList<IntIntLinkedEntry>(this.size()); Enumeration<IntIntLinkedEntry> en = this.entries(); while(en.hasMoreElements()){ list.add(en.nextElement()); } Collections.sort(list, c); this.clear(); for(int i = 0 ; i<list.size() ; i++){ IntIntLinkedEntry e = list.get(i); this.put(e.getKey(), e.getValue()); } } }
public synchronized void sort(Comparator<IntIntLinkedEntry> c){ ArrayList<IntIntLinkedEntry> list = new ArrayList<IntIntLinkedEntry>(this.size()); Enumeration<IntIntLinkedEntry> en = this.entries(); while(en.hasMoreElements()){ list.add(en.nextElement()); } Collections.sort(list, c); this.clear(); for(int i = 0 ; i<list.size() ; i++){ IntIntLinkedEntry e = list.get(i); this.put(e.getKey(), e.getValue()); } } }
public synchronized void sort(Comparator<IntIntLinkedEntry> c){ ArrayList<IntIntLinkedEntry> list = new ArrayList<IntIntLinkedEntry>(this.size()); Enumeration<IntIntLinkedEntry> en = this.entries(); while(en.hasMoreElements()){ list.add(en.nextElement()); } Collections.sort(list, c); this.clear(); for(int i = 0 ; i<list.size() ; i++){ IntIntLinkedEntry e = list.get(i); this.put(e.getKey(), e.getValue()); } } }
public synchronized void sort(Comparator<IntIntLinkedEntry> c){ ArrayList<IntIntLinkedEntry> list = new ArrayList<IntIntLinkedEntry>(this.size()); Enumeration<IntIntLinkedEntry> en = this.entries(); while(en.hasMoreElements()){ list.add(en.nextElement()); } Collections.sort(list, c); this.clear(); for(int i = 0 ; i<list.size() ; i++){ IntIntLinkedEntry e = list.get(i); this.put(e.getKey(), e.getValue()); } } }
private static int getSqlHash(String sql) { if (sql.length() < 100) return HashUtil.hash(sql); int id = sql.hashCode(); int hash = sqlHash.get(id); if (hash == 0) { hash = HashUtil.hash(sql); sqlHash.put(id, hash); } return hash; } private static IntLinkedSet sqlText = new IntLinkedSet().setMax(10000);
public void process(XLogPack p) { if (conf.summary_enabled == false) return; // service summary SummaryData d = getSummaryMap(serviceMaster, p.service); d.count++; d.elapsed += p.elapsed; if (p.error != 0) { d.error_cnt++; } d.cpu += p.cpu; d.mem += p.kbytes; // ip summary if (IPUtil.isOK(p.ipaddr) && p.ipaddr[0] != 0 && p.ipaddr[0] != 127) { int ip = DataInputX.toInt(p.ipaddr, 0); ipMaster.put(ip, ipMaster.get(ip) + 1); } // user-agent summary if (p.userAgent != 0) { uaMaster.put(p.userAgent, uaMaster.get(p.userAgent) + 1); } }
public void process(XLogPack p) { if (conf.summary_enabled == false) return; // service summary SummaryData d = getSummaryMap(serviceMaster, p.service); d.count++; d.elapsed += p.elapsed; if (p.error != 0) { d.error_cnt++; } d.cpu += p.cpu; d.mem += p.kbytes; // ip summary if (IPUtil.isOK(p.ipaddr) && p.ipaddr[0] != 0 && p.ipaddr[0] != 127) { int ip = DataInputX.toInt(p.ipaddr, 0); ipMaster.put(ip, ipMaster.get(ip) + 1); } // user-agent summary if (p.userAgent != 0) { uaMaster.put(p.userAgent, uaMaster.get(p.userAgent) + 1); } }
private static int getSqlHash(String sql) { if (sql.length() < 100) return HashUtil.hash(sql); int id = sql.hashCode(); int hash = sqlHash.get(id); if (hash == 0) { hash = HashUtil.hash(sql); sqlHash.put(id, hash); } return hash; }
private static int getSqlHash(String sql) { if (sql.length() < 100) return HashUtil.hash(sql); int id = sql.hashCode(); int hash = sqlHash.get(id); if (hash == 0) { hash = HashUtil.hash(sql); sqlHash.put(id, hash); } return hash; } private static IntLinkedSet sqlText = new IntLinkedSet().setMax(10000);
public synchronized void sort(Comparator<IntIntLinkedEntry> c){ ArrayList<IntIntLinkedEntry> list = new ArrayList<IntIntLinkedEntry>(this.size()); Enumeration<IntIntLinkedEntry> en = this.entries(); while(en.hasMoreElements()){ list.add(en.nextElement()); } Collections.sort(list, c); this.clear(); for(int i = 0 ; i<list.size() ; i++){ IntIntLinkedEntry e = list.get(i); this.put(e.getKey(), e.getValue()); } } }
public synchronized void sort(Comparator<IntIntLinkedEntry> c){ ArrayList<IntIntLinkedEntry> list = new ArrayList<IntIntLinkedEntry>(this.size()); Enumeration<IntIntLinkedEntry> en = this.entries(); while(en.hasMoreElements()){ list.add(en.nextElement()); } Collections.sort(list, c); this.clear(); for(int i = 0 ; i<list.size() ; i++){ IntIntLinkedEntry e = list.get(i); this.put(e.getKey(), e.getValue()); } } }
public synchronized void sort(Comparator<IntIntLinkedEntry> c){ ArrayList<IntIntLinkedEntry> list = new ArrayList<IntIntLinkedEntry>(this.size()); Enumeration<IntIntLinkedEntry> en = this.entries(); while(en.hasMoreElements()){ list.add(en.nextElement()); } Collections.sort(list, c); this.clear(); for(int i = 0 ; i<list.size() ; i++){ IntIntLinkedEntry e = list.get(i); this.put(e.getKey(), e.getValue()); } } }
public void process(XLogPack p) { if (conf.summary_enabled == false) return; // service summary SummaryData d = getSummaryMap(serviceMaster, p.service); d.count++; d.elapsed += p.elapsed; if (p.error != 0) { d.error_cnt++; } d.cpu += p.cpu; d.mem += p.kbytes; // ip summary if (IPUtil.isOK(p.ipaddr) && p.ipaddr[0] != 0 && p.ipaddr[0] != 127) { int ip = DataInputX.toInt(p.ipaddr, 0); ipMaster.put(ip, ipMaster.get(ip) + 1); } // user-agent summary if (p.userAgent != 0) { uaMaster.put(p.userAgent, uaMaster.get(p.userAgent) + 1); } }