Skip to content

Commit

Permalink
modified some contents
Browse files Browse the repository at this point in the history
  • Loading branch information
scouter-project committed Jun 7, 2015
1 parent f324a96 commit 9a7f299
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 40 deletions.
24 changes: 0 additions & 24 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,28 +176,4 @@
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2015 LG CNS.
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.
```
32 changes: 16 additions & 16 deletions scouter.agent/src/scouter/agent/trace/ProfileSummary.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public class ProfileSummary implements IProfileCollector {

private TraceContext context;

protected IntKeyMap methods;
protected IntKeyMap sqls;
protected IntKeyMap subcalls;
protected IntKeyMap apicalls;
protected LongKeyMap sockets;
protected IntKeyMap<Step> methods;
protected IntKeyMap<Step> sqls;
protected IntKeyMap<Step> subcalls;
protected IntKeyMap<Step> apicalls;
protected LongKeyMap<Step> sockets;
protected List<Step> messages;
protected int magindex=0;
protected int totalCount;
Expand All @@ -67,21 +67,21 @@ protected void process() {

}

private void toArray(IntKeyMap src, List<Step> out) {
private void toArray(IntKeyMap<Step> src, List<Step> out) {
if (src == null)
return;
Enumeration en = src.values();
Enumeration<Step> en = src.values();
for (int i = 0, max = src.size(); i < max; i++) {
out.add((Step) en.nextElement());
out.add(en.nextElement());
}
src.clear();
}
private void toArray(LongKeyMap src, List<Step> out) {
private void toArray(LongKeyMap<Step> src, List<Step> out) {
if (src == null)
return;
Enumeration en = src.values();
Enumeration<Step> en = src.values();
for (int i = 0, max = src.size(); i < max; i++) {
out.add((Step) en.nextElement());
out.add(en.nextElement());
}
src.clear();
}
Expand Down Expand Up @@ -138,7 +138,7 @@ protected void add(MessageStep m) {
process();
}
if (messages == null)
messages = new ArrayList();
messages = new ArrayList<Step>();
m.index = magindex++;
m.parent = -1;
messages.add(m);
Expand All @@ -147,7 +147,7 @@ protected void add(MessageStep m) {
protected void add(SocketStep m) {

if (sockets == null)
sockets = new LongKeyMap();
sockets = new LongKeyMap<Step>();

long skid = m.getSocketId();
SocketSum sksum = (SocketSum) sockets.get(skid);
Expand All @@ -168,7 +168,7 @@ protected void add(SocketStep m) {

protected void add(MethodStep m) {
if (methods == null)
methods = new IntKeyMap();
methods = new IntKeyMap<Step>();

MethodSum msum = (MethodSum) methods.get(m.hash);
if (msum != null) {
Expand All @@ -188,7 +188,7 @@ protected void add(MethodStep m) {

protected void add(SqlStep ss) {
if (sqls == null)
sqls = new IntKeyMap();
sqls = new IntKeyMap<Step>();

SqlSum ssum = (SqlSum) sqls.get(ss.hash);
if (ssum != null) {
Expand Down Expand Up @@ -217,7 +217,7 @@ protected void add(SqlStep ss) {

protected void add(ApiCallStep sc) {
if (subcalls == null)
subcalls = new IntKeyMap();
subcalls = new IntKeyMap<Step>();

ApiCallSum scs = (ApiCallSum) apicalls.get(sc.hash);
if (scs != null) {
Expand Down

0 comments on commit 9a7f299

Please sign in to comment.