Skip to content

Commit

Permalink
Merge pull request handuyishe#22 from lynnchae/develop_mobanker
Browse files Browse the repository at this point in the history
max_concurrent统计函数
  • Loading branch information
majinkai authored Sep 13, 2016
2 parents a712895 + c88c506 commit 69c53d3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.handu.open</groupId>
<artifactId>dubbo-monitor</artifactId>
<artifactId>dubbo-monitor-x</artifactId>
<version>1.0.0</version>
<packaging>war</packaging>

Expand Down Expand Up @@ -295,7 +295,7 @@
</dependencies>

<build>
<finalName>dubbo-monitor</finalName>
<finalName>dubbo-monitor-x</finalName>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
Expand All @@ -304,6 +304,7 @@
<configuration>
<path>/${project.build.finalName}</path>
<uriEncoding>UTF-8</uriEncoding>
<port>8182</port>
</configuration>
</plugin>
</plugins>
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
# 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.
dubbo.application.name=dubbo-monitor
dubbo.application.name=dubbo-monitor-x
dubbo.application.owner=
dubbo.registry.address=zookeeper://127.0.0.1:2181
dubbo.registry.address=zookeeper://192.168.1.114:2181?backup=192.168.1.114:2182,192.168.1.114:2183
dubbo.protocol.port=6060

# Database Settings
db.url=jdbc:mysql://127.0.0.1:3306/monitor?prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8
db.url=jdbc:mysql://default:3306/dubbokeeper?prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8
db.username=root
db.password=root
db.password=raycool
db.maxActive=500

# System Manager
Expand Down
22 changes: 13 additions & 9 deletions src/main/resources/log4j.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@
-->
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n" />
</layout>
</appender>
<root>
<level value="WARN" />
<appender-ref ref="CONSOLE" />
</root>
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n"/>
</layout>
</appender>
<root>
<level value="INFO"/>
<appender-ref ref="CONSOLE"/>
</root>

<logger name="com.handu">
<level value="DEBUG"/>
</logger>
</log4j:configuration>
4 changes: 1 addition & 3 deletions src/main/resources/mappers/DubboInvokeMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@
SUM(dubbo_invoke.elapsed) / SUM(dubbo_invoke.success) as elapsed,
dubbo_invoke.invoke_time DIV #{timeParticle} * #{timeParticle} as invokeTime
FROM dubbo_invoke

WHERE 1 = 1

<if test="invokeDate != null">
AND dubbo_invoke.invoke_date = DATE_FORMAT(#{invokeDate},'%Y-%m-%d')
</if>
Expand All @@ -96,7 +94,7 @@
<if test="type != null and type!= '' ">
AND dubbo_invoke.type = #{type}
</if>
GROUP BY dubbo_invoke.invoke_time DIV #{timeParticle}
GROUP BY dubbo_invoke.invoke_time DIV #{timeParticle} * #{timeParticle}
</select>

<select id="countDubboInvokeInfo" parameterType="com.handu.open.dubbo.monitor.domain.DubboInvoke" resultType="com.handu.open.dubbo.monitor.domain.DubboInvoke">
Expand Down

0 comments on commit 69c53d3

Please sign in to comment.