-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
223 changed files
with
14,136 additions
and
413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[counter] | ||
//public void counter(scouter.lang.pack.PerfCounterPack $pack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
scouter.agent.java/src/main/java/scouter/agent/asm/jdbc/StInitMV.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright 2015 Scouter Project. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package scouter.agent.asm.jdbc; | ||
|
||
import scouter.agent.trace.TraceSQL; | ||
import scouter.org.objectweb.asm.MethodVisitor; | ||
import scouter.org.objectweb.asm.Opcodes; | ||
import scouter.org.objectweb.asm.commons.LocalVariablesSorter; | ||
|
||
public class StInitMV extends LocalVariablesSorter implements Opcodes { | ||
|
||
private final static String TRACESQL = TraceSQL.class.getName().replace('.', '/'); | ||
private final static String METHOD_INIT = "stmtInit"; | ||
private final static String SIGNATURE_INIT = "(Ljava/lang/Object;)V"; | ||
|
||
public StInitMV(int access, String desc, MethodVisitor mv) { | ||
super(ASM5,access, desc, mv); | ||
} | ||
|
||
@Override | ||
public void visitInsn(int opcode) { | ||
if (opcode >= IRETURN && opcode <= RETURN) { | ||
mv.visitVarInsn(ALOAD, 0); | ||
mv.visitMethodInsn(Opcodes.INVOKESTATIC, TRACESQL, METHOD_INIT, SIGNATURE_INIT, false); | ||
} | ||
mv.visitInsn(opcode); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
scouter.agent.java/src/main/java/scouter/agent/counter/task/PluginTask.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package scouter.agent.counter.task; | ||
|
||
import scouter.agent.counter.CounterBasket; | ||
import scouter.agent.counter.anotation.Counter; | ||
import scouter.agent.plugin.PluginCounter; | ||
|
||
public class PluginTask { | ||
|
||
@Counter | ||
public void pluginCounter(CounterBasket pw) { | ||
PluginCounter.counter(pw); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
scouter.agent.java/src/main/java/scouter/agent/plugin/AbstractCounter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package scouter.agent.plugin; | ||
|
||
import scouter.lang.pack.PerfCounterPack; | ||
|
||
abstract public class AbstractCounter extends AbstractPlugin { | ||
|
||
abstract public void counter(PerfCounterPack pack); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
scouter.agent.java/src/main/java/scouter/agent/plugin/PluginCounter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package scouter.agent.plugin; | ||
|
||
import scouter.agent.counter.CounterBasket; | ||
import scouter.lang.TimeTypeEnum; | ||
|
||
public class PluginCounter { | ||
|
||
static AbstractCounter plugIn; | ||
|
||
static { | ||
PluginLoader.getInstance(); | ||
} | ||
|
||
public static void counter(CounterBasket cw) { | ||
|
||
if (plugIn != null) { | ||
try { | ||
plugIn.counter(cw.getPack(TimeTypeEnum.REALTIME)); | ||
} catch (Throwable th) { | ||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.