From 7938754179d45c9b20659677ecfd06140f7e7c0e Mon Sep 17 00:00:00 2001 From: Hyun Jeong Date: Wed, 23 Jul 2014 16:38:22 +0900 Subject: [PATCH 01/12] Initial Commit --- pom.xml | 58 +++++++++++++++++++ .../cpu/metric/EnhancedCpuLoadMetricSet.java | 31 ++++++++++ 2 files changed, 89 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/com/nhn/pinpoint/profiler/monitor/codahale/cpu/metric/EnhancedCpuLoadMetricSet.java diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..02b737de1 --- /dev/null +++ b/pom.xml @@ -0,0 +1,58 @@ + + 4.0.0 + com.nhn.pinpoint + pinpoint-profiler-optional + 1.0.2-SNAPSHOT + pinpoint profiler optional + pinpoint profiler optional package + + + + com.nhn.pinpoint + pinpoint-profiler + 1.0.2-SNAPSHOT + provided + + + com.nhn.pinpoint + pinpoint-commons + + + com.nhn.pinpoint + pinpoint-bootstrap + + + com.nhn.pinpoint + pinpoint-rpc + + + com.nhn.pinpoint + pinpoint-thrift + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + true + + 1.7 + 1.7 + ${compiler-debug} + true + UTF-8 + + + + org.apache.maven.plugins + maven-jar-plugin + 2.4 + + + + \ No newline at end of file diff --git a/src/main/java/com/nhn/pinpoint/profiler/monitor/codahale/cpu/metric/EnhancedCpuLoadMetricSet.java b/src/main/java/com/nhn/pinpoint/profiler/monitor/codahale/cpu/metric/EnhancedCpuLoadMetricSet.java new file mode 100644 index 000000000..3ffa0ef0e --- /dev/null +++ b/src/main/java/com/nhn/pinpoint/profiler/monitor/codahale/cpu/metric/EnhancedCpuLoadMetricSet.java @@ -0,0 +1,31 @@ +package com.nhn.pinpoint.profiler.monitor.codahale.cpu.metric; + +import com.codahale.metrics.Gauge; +import com.sun.management.OperatingSystemMXBean; + +/** + * @author hyungil.jeong + */ +public class EnhancedCpuLoadMetricSet extends AbstractCpuLoadMetricSet { + + @Override + protected Gauge getJvmCpuLoadGauge(final OperatingSystemMXBean operatingSystemMXBean) { + return new Gauge() { + @Override + public Double getValue() { + return operatingSystemMXBean.getProcessCpuLoad(); + } + }; + } + + @Override + protected Gauge getSystemCpuLoadGauge(final OperatingSystemMXBean operatingSystemMXBean) { + return new Gauge() { + @Override + public Double getValue() { + return operatingSystemMXBean.getSystemCpuLoad(); + } + }; + } + +} From 78c06f9ac62fc18cebff246abbebf03dbc51a685 Mon Sep 17 00:00:00 2001 From: Hyun Jeong Date: Fri, 25 Jul 2014 16:22:04 +0900 Subject: [PATCH 02/12] =?UTF-8?q?[NOBTS]=20=ED=94=8C=EB=9F=AC=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/pom.xml b/pom.xml index 02b737de1..6fd889a70 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,39 @@ + + + ${basedir}/src/main/java + + **/*.java + + + + true + ${basedir}/src/main/resources + + + + + ${basedir}/src/test/java + + **/*.java + + + + true + ${basedir}/src/test/resources + + + + + maven-resources-plugin + 2.6 + + UTF-8 + + org.apache.maven.plugins maven-compiler-plugin @@ -53,6 +85,32 @@ maven-jar-plugin 2.4 + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12.4 + + + org.codehaus.mojo + findbugs-maven-plugin + 2.5.2 + + + com.atlassian.maven.plugins + maven-clover2-plugin + 3.0.2 + + UTF-8 + 1.6 + true + true + false + clover.license + false + false + + \ No newline at end of file From 3e7b0ce3f38dac9aa8f4ccc49a9c4f7d2995a6f3 Mon Sep 17 00:00:00 2001 From: Hyun Jeong Date: Fri, 25 Jul 2014 16:19:54 +0900 Subject: [PATCH 03/12] =?UTF-8?q?[#1]=20=EB=B9=8C=EB=93=9C=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.bat | 1 + build.sh | 9 +++++++++ build.xml | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 build.bat create mode 100644 build.sh create mode 100644 build.xml diff --git a/build.bat b/build.bat new file mode 100644 index 000000000..6b76f432f --- /dev/null +++ b/build.bat @@ -0,0 +1 @@ +mvn package install -Dmaven.test.skip \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 000000000..82a52e8c8 --- /dev/null +++ b/build.sh @@ -0,0 +1,9 @@ +#! /bin/bash +# profiler-optional lib +mvn clean eclipse:eclipse package install -Dmaven.test.skip + +rc=$? +if [[ $rc != 0 ]] ; then + echo "BUILD FAILED $rc" + exit $rc +fi \ No newline at end of file diff --git a/build.xml b/build.xml new file mode 100644 index 000000000..437b91c3a --- /dev/null +++ b/build.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 5d62ea88dec322cfd3b4bde3fb103f17826482fd Mon Sep 17 00:00:00 2001 From: Hyun Jeong Date: Mon, 28 Jul 2014 15:47:55 +0900 Subject: [PATCH 04/12] [NOBTS] Tag 1.0.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6fd889a70..c260b9857 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.nhn.pinpoint pinpoint-profiler-optional - 1.0.2-SNAPSHOT + 1.0.1 pinpoint profiler optional pinpoint profiler optional package From ed70c7655eb77353d07e46c58b20b8a48d3385e4 Mon Sep 17 00:00:00 2001 From: Hyun Jeong Date: Mon, 28 Jul 2014 17:40:34 +0900 Subject: [PATCH 05/12] =?UTF-8?q?[NOBTS]=201.0.2-SNAPSHOT=20=EB=B2=84?= =?UTF-8?q?=EC=A0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c260b9857..6fd889a70 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.nhn.pinpoint pinpoint-profiler-optional - 1.0.1 + 1.0.2-SNAPSHOT pinpoint profiler optional pinpoint profiler optional package From 69a4ca83acf9339622a5dd2ac9a0c31a2df4c133 Mon Sep 17 00:00:00 2001 From: Hyun Jeong Date: Tue, 29 Jul 2014 17:18:54 +0900 Subject: [PATCH 06/12] =?UTF-8?q?[NOBTS]=20JDK7=20=EA=B4=80=EB=A0=A8=20pom?= =?UTF-8?q?.xml=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6fd889a70..07c63585c 100644 --- a/pom.xml +++ b/pom.xml @@ -77,6 +77,10 @@ 1.7 ${compiler-debug} true + true + true + 1.7 + ${JAVA_7_HOME}/bin/javac UTF-8 @@ -90,6 +94,10 @@ org.apache.maven.plugins maven-surefire-plugin 2.12.4 + + ${JAVA_7_HOME}/bin/java + once + org.codehaus.mojo @@ -102,7 +110,7 @@ 3.0.2 UTF-8 - 1.6 + 1.7 true true false From c976be628a5a9211e49c954401b0776df9e1d718 Mon Sep 17 00:00:00 2001 From: Hyun Jeong Date: Tue, 29 Jul 2014 17:36:53 +0900 Subject: [PATCH 07/12] =?UTF-8?q?[NOBTS]=20README=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..da0e5d066 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +Pinpoint-profiler-optional +========= + +아래와 같이 maven compile을 하기 위해서는 JDK 1.7+이 필요합니다. +```xml + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + true + + 1.7 + 1.7 + ${compiler-debug} + true + true + true + 1.7 + ${JAVA_7_HOME}/bin/javac + UTF-8 + + +``` + +환경변수에 JAVA_7_HOME을 잡아주시거나, maven의 settings.xml에 JAVA_7_HOME property를 설정해주세요. \ No newline at end of file From 396b7e5def36e572f0e146a25315c66578e57c02 Mon Sep 17 00:00:00 2001 From: Hyun Jeong Date: Thu, 31 Jul 2014 19:32:53 +0900 Subject: [PATCH 08/12] =?UTF-8?q?[Pinpoint/pinpoint-profiler#13]=20toStrin?= =?UTF-8?q?g()=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codahale/cpu/metric/EnhancedCpuLoadMetricSet.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/nhn/pinpoint/profiler/monitor/codahale/cpu/metric/EnhancedCpuLoadMetricSet.java b/src/main/java/com/nhn/pinpoint/profiler/monitor/codahale/cpu/metric/EnhancedCpuLoadMetricSet.java index 3ffa0ef0e..d80cbb1a4 100644 --- a/src/main/java/com/nhn/pinpoint/profiler/monitor/codahale/cpu/metric/EnhancedCpuLoadMetricSet.java +++ b/src/main/java/com/nhn/pinpoint/profiler/monitor/codahale/cpu/metric/EnhancedCpuLoadMetricSet.java @@ -28,4 +28,9 @@ public class EnhancedCpuLoadMetricSet extends AbstractCpuLoadMetricSet { }; } + @Override + public String toString() { + return "CpuLoadMetricSet for Java 1.7+"; + } + } From 402c781fb1971a39f7313b13c719f215002aca8a Mon Sep 17 00:00:00 2001 From: Hyun Jeong Date: Thu, 31 Jul 2014 19:33:15 +0900 Subject: [PATCH 09/12] =?UTF-8?q?[NOBTS]=20maven=20profile=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 07c63585c..d5b26da6c 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,47 @@ - + + + local + + true + + + local + deploy + true + + + + + + test + + test + true + + + + + + dev + + dev + true + + + + + + release + + release + false + + + + From 1a256fee8d62046935ef509189d9b8242eab63bc Mon Sep 17 00:00:00 2001 From: Hyun Jeong Date: Fri, 1 Aug 2014 17:07:18 +0900 Subject: [PATCH 10/12] =?UTF-8?q?[NOBTS]=20pinpoint-agent/lib=EC=97=90=20?= =?UTF-8?q?=EC=A0=81=EC=A0=88=ED=9E=88=20=EB=B3=B5=EC=82=AC=EB=90=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B9=8C=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 31 +++++++++++++++++++++++++++++-- build.xml | 13 +++++++++++-- pom.xml | 18 ++++++++++++++++++ 3 files changed, 58 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 82a52e8c8..04e3a60f5 100644 --- a/build.sh +++ b/build.sh @@ -1,7 +1,34 @@ #! /bin/bash -# profiler-optional lib -mvn clean eclipse:eclipse package install -Dmaven.test.skip +VERSION="1.0.2-SNAPSHOT" +OUT_JAR="pinpoint-profiler-optional-$VERSION.jar" +DEPLOY_DIR="../pinpoint-testbed/agent" + +# profile +PROFILE="" +if [ "$1" != "" ] ; then + PROFILE="-P $1" + echo "*********************" + echo "USING PROFILE $1" + echo "*********************" +else + echo "*********************" + echo "USING DEFAULT PROFILE" + echo "*********************" +fi + +# cleanup optional jar in deploy directory +rm $DEPLOY_DIR/$OUT_JAR + +mvn clean install eclipse:eclipse package -Dmaven.test.skip $PROFILE +rc=$? +if [[ $rc != 0 ]] ; then + echo "BUILD FAILED $rc" + exit $rc +fi + +# copy optional jar to deploy directory +cp ./target/$OUT_JAR $DEPLOY_DIR rc=$? if [[ $rc != 0 ]] ; then echo "BUILD FAILED $rc" diff --git a/build.xml b/build.xml index 437b91c3a..0e9d91f1e 100644 --- a/build.xml +++ b/build.xml @@ -1,4 +1,4 @@ - + @@ -7,6 +7,11 @@ + + + + + @@ -15,6 +20,11 @@ + + + + + @@ -23,7 +33,6 @@ - diff --git a/pom.xml b/pom.xml index d5b26da6c..231fb4f47 100644 --- a/pom.xml +++ b/pom.xml @@ -129,6 +129,24 @@ maven-jar-plugin 2.4 + + maven-antrun-plugin + + + package + + + + + + + + run + + + + org.apache.maven.plugins From 829ba5b93ddd3db2ab95c5fa8b0d93d80f8d13ce Mon Sep 17 00:00:00 2001 From: Hyun Jeong Date: Fri, 1 Aug 2014 17:12:25 +0900 Subject: [PATCH 11/12] =?UTF-8?q?[NOBTS]=20JAVA=5F7=5FHOME=20-=20settings.?= =?UTF-8?q?xml=20=EC=84=A4=EC=A0=95=20=EB=B0=A9=EB=B2=95=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index da0e5d066..3e7e769d3 100644 --- a/README.md +++ b/README.md @@ -22,4 +22,21 @@ Pinpoint-profiler-optional ``` -환경변수에 JAVA_7_HOME을 잡아주시거나, maven의 settings.xml에 JAVA_7_HOME property를 설정해주세요. \ No newline at end of file +환경변수에 JAVA_7_HOME을 잡아주시고, maven의 settings.xml에 JAVA_7_HOME property를 아래와 같이 설정해주세요. + +(m2e 플러그인을 사용한 maven 빌드를 하시려면 settings.xml을 수정하셔야 합니다.) +```xml + + + + JAVA_7_HOME + + JDK 1.7+ 패스 + + + + + JAVA_7_HOME + + +``` \ No newline at end of file From 7b8622d25008c2ac649a767217c93c8d4d114cef Mon Sep 17 00:00:00 2001 From: Woonduk Kang Date: Thu, 21 Aug 2014 19:54:43 +0900 Subject: [PATCH 12/12] =?UTF-8?q?[RELEASE-8]=201.0.2=20=EB=A6=B4=EB=A6=AC?= =?UTF-8?q?=EC=A7=80=EB=A5=BC=20=EC=9C=84=ED=95=B4=20=EB=B2=84=EC=A0=84?= =?UTF-8?q?=EB=B3=80=EA=B2=BD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.xml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.xml b/build.xml index 0e9d91f1e..cde37bc50 100644 --- a/build.xml +++ b/build.xml @@ -2,7 +2,7 @@ - + diff --git a/pom.xml b/pom.xml index 231fb4f47..02617f22e 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.nhn.pinpoint pinpoint-profiler-optional - 1.0.2-SNAPSHOT + 1.0.2 pinpoint profiler optional pinpoint profiler optional package @@ -10,7 +10,7 @@ com.nhn.pinpoint pinpoint-profiler - 1.0.2-SNAPSHOT + 1.0.2 provided