Merge branch 'master' of https://git.lightsinline.se/lilchger/LILOM.git
Showing
9 changed files
with
29 additions
and
130 deletions
... | @@ -61,8 +61,11 @@ public class Actions | ... | @@ -61,8 +61,11 @@ public class Actions |
61 | { | 61 | { |
62 | String instance = oracle.getDBName(); | 62 | String instance = oracle.getDBName(); |
63 | sendDataPoint("ORA Cpus (#) " + instance, oracle.getNumberOfCPUs()); | 63 | sendDataPoint("ORA Cpus (#) " + instance, oracle.getNumberOfCPUs()); |
64 | sendDataPoint("ORA Cpu Time (ms/s) " + instance, oracle.getCPUTimePerSecond()); | 64 | sendDataPoint("ORA Cpu Time (us/s) " + instance, oracle.getCPUTimePerSecond()); |
65 | sendDataPoint("ORA Cpu Usage (%) " + instance, oracle.getCPUPercent()); | 65 | sendDataPoint("ORA Cpu Usage (%) " + instance, oracle.getCPUPercent()); |
66 | sendDataPoint("ORA OS Busy (%) " + instance, oracle.getOsBusyPercent()); | ||
67 | sendDataPoint("ORA OS Load (#) " + instance, oracle.getOsLoad()); | ||
68 | sendDataPoint("ORA OS Load per Cpu (#) " + instance, oracle.getOsLoadPerCPU()); | ||
66 | sendDataPoint("ORA Logical Reads (#/s) " + instance, oracle.getLogicalReadsPerSecond()); | 69 | sendDataPoint("ORA Logical Reads (#/s) " + instance, oracle.getLogicalReadsPerSecond()); |
67 | sendDataPoint("ORA Consistent Gets (#/s) " + instance, oracle.getPerSecondValue("consistent gets")); | 70 | sendDataPoint("ORA Consistent Gets (#/s) " + instance, oracle.getPerSecondValue("consistent gets")); |
68 | sendDataPoint("ORA DB Block Gets (#/s) " + instance, oracle.getPerSecondValue("db block gets")); | 71 | sendDataPoint("ORA DB Block Gets (#/s) " + instance, oracle.getPerSecondValue("db block gets")); | ... | ... |
JavaMON/Actions.java.sed
deleted
100644 → 0
1 | /* | ||
2 | * LoadRunner Java script. (Build: _build_number_) | ||
3 | * | ||
4 | * Script Description: | ||
5 | * | ||
6 | */ | ||
7 | |||
8 | import java.util.ArrayList; | ||
9 | import lrapi.lr; | ||
10 | import se.lil.om.*; | ||
11 | |||
12 | public class Actions | ||
13 | { | ||
14 | |||
15 | ArrayList<OraMon> oraList = new ArrayList<OraMon>(); | ||
16 | |||
17 | boolean firstIteration = true; | ||
18 | String empty = ""; | ||
19 | |||
20 | public int init() throws Throwable | ||
21 | { | ||
22 | if(lr.get_attrib_string("ConnectionString") == null || lr.get_attrib_string("User") == null || lr.get_attrib_string("Password") == null || | ||
23 | lr.get_attrib_string("ConnectionString").equals(empty) || lr.get_attrib_string("User").equals(empty) || lr.get_attrib_string("Password").equals(empty)) | ||
24 | { | ||
25 | lr.error_message("Attributes are missing for Oracle: ConnectionString, User or Password are null. Nothing to do, aborting vuser."); | ||
26 | lr.exit(lr.EXIT_VUSER, lr.FAIL); | ||
27 | } | ||
28 | |||
29 | String[] conS = lr.get_attrib_string("ConnectionString").split(","); | ||
30 | String[] usrS = lr.get_attrib_string("User").split(","); | ||
31 | String[] pasS = lr.get_attrib_string("Password").split(","); | ||
32 | |||
33 | if(conS.length != usrS.length || conS.length != pasS.length) | ||
34 | { | ||
35 | lr.error_message("Oracle has multiple comma separated connection strings but not the same number of multiple user or password strings. Cannot continue, abort."); | ||
36 | lr.exit(lr.EXIT_VUSER, lr.FAIL); | ||
37 | } | ||
38 | |||
39 | for(int x=0; x<conS.length; x++) | ||
40 | { | ||
41 | OraMon mon = new OraMon(); | ||
42 | lr.debug_message (lr.MSG_CLASS_EXTENDED_LOG , " Using " + conS[x].trim() + " User " + usrS[x].trim() + " Pass " + pasS[x].trim()); | ||
43 | mon.open(conS[x].trim(), usrS[x].trim(), pasS[x].trim()); | ||
44 | oraList.add(mon); | ||
45 | } | ||
46 | return 0; | ||
47 | }////end of init | ||
48 | |||
49 | |||
50 | public int action() throws Throwable | ||
51 | { | ||
52 | |||
53 | for(OraMon oracle : oraList) | ||
54 | { | ||
55 | lr.debug_message (lr.MSG_CLASS_EXTENDED_LOG , "#### ORACLE COUNTERS ####"); | ||
56 | lr.debug_message (lr.MSG_CLASS_EXTENDED_LOG, "Using: " + oracle.getConString()); | ||
57 | oracle.getData(); | ||
58 | lr.debug_message (lr.MSG_CLASS_EXTENDED_LOG, "Returned DB Name: " + oracle.getDBName()); | ||
59 | |||
60 | if(firstIteration == false) | ||
61 | { | ||
62 | String instance = oracle.getDBName(); | ||
63 | sendDataPoint("ORA Cpus (#) " + instance, oracle.getNumberOfCPUs()); | ||
64 | sendDataPoint("ORA Cpu Time (ms/s) " + instance, oracle.getCPUTimePerSecond()); | ||
65 | sendDataPoint("ORA Cpu Usage (%) " + instance, oracle.getCPUPercent()); | ||
66 | sendDataPoint("ORA Logical Reads (#/s) " + instance, oracle.getLogicalReadsPerSecond()); | ||
67 | sendDataPoint("ORA Consistent Gets (#/s) " + instance, oracle.getPerSecondValue("consistent gets")); | ||
68 | sendDataPoint("ORA DB Block Gets (#/s) " + instance, oracle.getPerSecondValue("db block gets")); | ||
69 | sendDataPoint("ORA Cache Hit Ratio (%) " + instance, oracle.getCacheHitRatioPercent()); | ||
70 | sendDataPoint("ORA Buffer Cache Hit Ratio (%) " + instance, oracle.getBufferCacheHitRatioPercent()); | ||
71 | sendDataPoint("ORA DB Block Changes (#/s) " + instance, oracle.getPerSecondValue("db block changes")); | ||
72 | sendDataPoint("ORA Redo Size (#/s) " + instance, oracle.getPerSecondValue("redo size")); | ||
73 | sendDataPoint("ORA Physical Reads (#/s) " + instance, oracle.getPerSecondValue("physical reads")); | ||
74 | sendDataPoint("ORA Physical Writes (#/s) " + instance, oracle.getPerSecondValue("physical writes")); | ||
75 | sendDataPoint("ORA Redo Writes (#/s) " + instance, oracle.getPerSecondValue("redo writes")); | ||
76 | sendDataPoint("ORA Non-idle Wait Time (ms/s) " + instance, oracle.getPerSecondValue("non-idle wait time")); | ||
77 | sendDataPoint("ORA File I/O Wait Time (ms/s) " + instance, oracle.getPerSecondValue("file io wait time")); | ||
78 | sendDataPoint("ORA Executes (#/s) " + instance, oracle.getPerSecondValue("execute count")); | ||
79 | sendDataPoint("ORA User Calls (#/s) " + instance, oracle.getPerSecondValue("user calls")); | ||
80 | sendDataPoint("ORA User Commits (#/s) " + instance, oracle.getPerSecondValue("user commits")); | ||
81 | sendDataPoint("ORA User Rollbacks (#/s) " + instance, oracle.getPerSecondValue("user rollbacks")); | ||
82 | sendDataPoint("ORA Parse Count Total (#/s) " + instance, oracle.getPerSecondValue("parse count (total)")); | ||
83 | sendDataPoint("ORA Parse Count Hard (#/s) " + instance, oracle.getPerSecondValue("parse count (hard)")); | ||
84 | } else { | ||
85 | firstIteration = false; | ||
86 | } | ||
87 | } | ||
88 | |||
89 | return 0; | ||
90 | }////end of action | ||
91 | |||
92 | |||
93 | public int end() throws Throwable | ||
94 | { | ||
95 | for(OraMon oracle : oraList) | ||
96 | { | ||
97 | oracle.close(); | ||
98 | } | ||
99 | |||
100 | return 0; | ||
101 | }////end of end | ||
102 | |||
103 | // Needed to avoid LR12 VuGen from hanging in a CPU loop (later fixed by a patch but just in case) | ||
104 | public void sendDataPoint(String name, double value) | ||
105 | { | ||
106 | lr.user_data_point(name, value); | ||
107 | } | ||
108 | } | ||
109 | |||
110 |
... | @@ -47,7 +47,7 @@ Default Profile=default.usp | ... | @@ -47,7 +47,7 @@ Default Profile=default.usp |
47 | 21=0 | 47 | 21=0 |
48 | CurrentState=1 | 48 | CurrentState=1 |
49 | VuserStateHistory=0 65536 65552 | 49 | VuserStateHistory=0 65536 65552 |
50 | LastReplayStatus=2 | 50 | LastReplayStatus=1 |
51 | [ActiveReplay] | 51 | [ActiveReplay] |
52 | LastReplayedRunName=result1 | 52 | LastReplayedRunName=result1 |
53 | ActiveRunName=result1 | 53 | ActiveRunName=result1 |
... | @@ -63,10 +63,10 @@ vuser_end=1 | ... | @@ -63,10 +63,10 @@ vuser_end=1 |
63 | vuser_init=0 | 63 | vuser_init=0 |
64 | Actions=1 | 64 | Actions=1 |
65 | vuser_end=0 | 65 | vuser_end=0 |
66 | [ManuallyExtraFiles] | ||
67 | lilom.jar= | ||
68 | ojdbc6.jar= | ||
69 | [Interpreters] | 66 | [Interpreters] |
70 | vuser_init=Java-Interpreter | 67 | vuser_init=Java-Interpreter |
71 | Actions=Java-Interpreter | 68 | Actions=Java-Interpreter |
72 | vuser_end=Java-Interpreter | 69 | vuser_end=Java-Interpreter |
70 | [ManuallyExtraFiles] | ||
71 | lilom.jar= | ||
72 | ojdbc6.jar= | ... | ... |
... | @@ -28,21 +28,28 @@ MsgClassFull=0 | ... | @@ -28,21 +28,28 @@ MsgClassFull=0 |
28 | AutoLog=0 | 28 | AutoLog=0 |
29 | PrintTimeStamp=0 | 29 | PrintTimeStamp=0 |
30 | [CommandArguments] | 30 | [CommandArguments] |
31 | ConnectionString=jdbc:oracle:thin:@host:port:sid | 31 | ConnectionString=jdbc:oracle:thin:@192.168.154.128:1521:XE |
32 | ~ConnectionString=Tex "jdbc:oracle:thin:@host:port:sid" | 32 | ~ConnectionString=Tex "jdbc:oracle:thin:@host:port:sid" |
33 | User=system | 33 | User=system |
34 | ~User=Tex "oracleuser" | 34 | ~User=Tex "oracleuser" |
35 | Password=passw0rd | 35 | Password=2w0o3e9i |
36 | ~Password= | 36 | ~Password= |
37 | [JavaVM:Options] | 37 | [JavaVM:Options] |
38 | Java_Env_ClassPath=ojdbc6.jar;se.ttm.tdemon.jar; | 38 | Java_Env_ClassPath=lilom.jar;ojdbc6.jar; |
39 | Java_Env_ClassPath_Unused= | 39 | Java_Env_ClassPath_Unused= |
40 | Java_Previous_Class_Path= | 40 | Java_Previous_Class_Path= |
41 | use_jdk=search_jdk | 41 | use_jdk=specified_jdk |
42 | jdk_home= | 42 | jdk_home=C:\Program Files (x86)\Java\jdk1.7.0_80 |
43 | Java_VM_Params= | 43 | Java_VM_Params= |
44 | Use_Xboot=0 | 44 | Use_Xboot=0 |
45 | enable_CL_per_vuser=0 | 45 | enable_CL_per_vuser=0 |
46 | jdk_home_extra_arg_1= | ||
47 | jdk_home_extra_arg_2=C:\Program Files\Java\jdk1.7.0_80 | ||
48 | Java_VM_Params_extra_arg_1= | ||
49 | jdk_home_extra_arg_3=C:\Program Files (x86)\Java\jdk1.7.0_80 | ||
50 | jdk_home_extra_arg_4=C:\Program Files (x86)\Java\jdk1.6.0_45 | ||
51 | jdk_home_extra_arg_5=C:\Program Files (x86)\Java\jdk1.6.0_45\bin | ||
52 | jdk_home_extra_arg_6=C:\Program Files (x86)\Java\jdk1.6.0_45\ | ||
46 | [ModemSpeed] | 53 | [ModemSpeed] |
47 | EnableModemSpeed=0 | 54 | EnableModemSpeed=0 |
48 | EnableCustomModemSpeed=0 | 55 | EnableCustomModemSpeed=0 | ... | ... |
... | @@ -2,26 +2,26 @@ | ... | @@ -2,26 +2,26 @@ |
2 | MercIniTreeSectionName="vuser_end" | 2 | MercIniTreeSectionName="vuser_end" |
3 | RunLogicObjectKind="Action" | 3 | RunLogicObjectKind="Action" |
4 | Name="vuser_end" | 4 | Name="vuser_end" |
5 | RunLogicInterpreterType="Java-Interpreter" | ||
6 | MercIniTreeFather="RunLogicEndRoot" | ||
7 | RunLogicActionType="VuserEnd" | 5 | RunLogicActionType="VuserEnd" |
6 | MercIniTreeFather="RunLogicEndRoot" | ||
7 | RunLogicInterpreterType="Java-Interpreter" | ||
8 | [RunLogicInitRoot:vuser_init] | 8 | [RunLogicInitRoot:vuser_init] |
9 | MercIniTreeSectionName="vuser_init" | 9 | MercIniTreeSectionName="vuser_init" |
10 | RunLogicObjectKind="Action" | 10 | RunLogicObjectKind="Action" |
11 | Name="vuser_init" | 11 | Name="vuser_init" |
12 | RunLogicInterpreterType="Java-Interpreter" | ||
13 | MercIniTreeFather="RunLogicInitRoot" | ||
14 | RunLogicActionType="VuserInit" | 12 | RunLogicActionType="VuserInit" |
13 | MercIniTreeFather="RunLogicInitRoot" | ||
14 | RunLogicInterpreterType="Java-Interpreter" | ||
15 | [RunLogicRunRoot:Actions] | 15 | [RunLogicRunRoot:Actions] |
16 | MercIniTreeSectionName="Actions" | 16 | MercIniTreeSectionName="Actions" |
17 | RunLogicObjectKind="Action" | 17 | RunLogicObjectKind="Action" |
18 | Name="Actions" | 18 | Name="Actions" |
19 | RunLogicInterpreterType="Java-Interpreter" | ||
20 | MercIniTreeFather="RunLogicRunRoot" | ||
21 | RunLogicActionType="VuserRun" | 19 | RunLogicActionType="VuserRun" |
20 | MercIniTreeFather="RunLogicRunRoot" | ||
21 | RunLogicInterpreterType="Java-Interpreter" | ||
22 | [Profile Actions] | 22 | [Profile Actions] |
23 | Profile Actions name=vuser_init,Actions,vuser_end | ||
24 | MercIniTreeSectionName="Profile Actions" | 23 | MercIniTreeSectionName="Profile Actions" |
24 | Profile Actions name=vuser_init,Actions,vuser_end | ||
25 | MercIniTreeFather="" | 25 | MercIniTreeFather="" |
26 | [RunLogicRunRoot] | 26 | [RunLogicRunRoot] |
27 | RunLogicPaceConstTime="60,000" | 27 | RunLogicPaceConstTime="60,000" |
... | @@ -32,10 +32,10 @@ MercIniTreeFather="" | ... | @@ -32,10 +32,10 @@ MercIniTreeFather="" |
32 | RunLogicPaceType="ConstAfter" | 32 | RunLogicPaceType="ConstAfter" |
33 | MercIniTreeSons="Actions" | 33 | MercIniTreeSons="Actions" |
34 | RunLogicNumOfIterations="2" | 34 | RunLogicNumOfIterations="2" |
35 | Name="Run" | ||
36 | RunLogicAfterPaceMin="60,000" | 35 | RunLogicAfterPaceMin="60,000" |
37 | RunLogicRunMode="Sequential" | 36 | Name="Run" |
38 | RunLogicPaceConstAfterTime="15,000" | 37 | RunLogicPaceConstAfterTime="15,000" |
38 | RunLogicRunMode="Sequential" | ||
39 | RunLogicObjectKind="Group" | 39 | RunLogicObjectKind="Group" |
40 | RunLogicActionType="VuserRun" | 40 | RunLogicActionType="VuserRun" |
41 | RunLogicRandomPaceMin="60,000" | 41 | RunLogicRandomPaceMin="60,000" | ... | ... |
No preview for this file type
JavaMON/ojdbc5.jar
deleted
100644 → 0
No preview for this file type
... | @@ -2,7 +2,6 @@ | ... | @@ -2,7 +2,6 @@ |
2 | <classpath> | 2 | <classpath> |
3 | <classpathentry kind="src" path=""/> | 3 | <classpathentry kind="src" path=""/> |
4 | <classpathentry exported="true" kind="lib" path="lib/ojdbc6.jar"/> | 4 | <classpathentry exported="true" kind="lib" path="lib/ojdbc6.jar"/> |
5 | <classpathentry exported="true" kind="lib" path="lib/ojdbc5.jar"/> | ||
6 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | 5 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> |
7 | <classpathentry kind="output" path=""/> | 6 | <classpathentry kind="output" path=""/> |
8 | </classpath> | 7 | </classpath> | ... | ... |
LILOM Library/lib/ojdbc5.jar
deleted
100644 → 0
No preview for this file type
-
Please register or sign in to post a comment