public static Object start(Object o) { TraceContext ctx = TraceContextManager.getContext(); if (ctx == null) { return null; } SqlStep3 step = new SqlStep3(); step.start_time = (int) (System.currentTimeMillis() - ctx.startTime); if (ctx.profile_thread_cputime) { step.start_cpu = (int) (SysJMX.getCurrentThreadCPU() - ctx.startCpu); } step.xtype = SqlXType.DYNA; ctx.sqlActiveArgs = ctx.sql; String sql = "unknown"; sql = ctx.sql.getSql(); sql = escapeLiteral(sql, step); step.param = ctx.sql.toString(step.param); if (sql != null) { step.hash = DataProxy.sendSqlText(sql); } ctx.profile.push(step); ctx.sqltext = sql; return new LocalContext(ctx, step); }
public static Object start(Object o) { TraceContext ctx = TraceContextManager.getContext(); if (ctx == null) { return null; } SqlStep3 step = new SqlStep3(); step.start_time = (int) (System.currentTimeMillis() - ctx.startTime); if (ctx.profile_thread_cputime) { step.start_cpu = (int) (SysJMX.getCurrentThreadCPU() - ctx.startCpu); } step.xtype = SqlXType.DYNA; ctx.sqlActiveArgs = ctx.sql; String sql = "unknown"; sql = ctx.sql.getSql(); sql = escapeLiteral(sql, step); step.param = ctx.sql.toString(step.param); if (sql != null) { step.hash = DataProxy.sendSqlText(sql); } ctx.profile.push(step); ctx.sqltext = sql; return new LocalContext(ctx, step); }
public static Object start(Object o) { TraceContext ctx = TraceContextManager.getContext(); if (ctx == null) { return null; } SqlStep3 step = new SqlStep3(); step.start_time = (int) (System.currentTimeMillis() - ctx.startTime); if (ctx.profile_thread_cputime) { step.start_cpu = (int) (SysJMX.getCurrentThreadCPU() - ctx.startCpu); } step.xtype = SqlXType.DYNA; ctx.sqlActiveArgs = ctx.sql; String sql = "unknown"; sql = ctx.sql.getSql(); sql = escapeLiteral(sql, step); step.param = ctx.sql.toString(step.param); if (sql != null) { step.hash = DataProxy.sendSqlText(sql); } ctx.profile.push(step); ctx.sqltext = sql; return new LocalContext(ctx, step); }