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);
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 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); } }