Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
1bdfa01a
Commit
1bdfa01a
authored
Mar 12, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/xgh/20241月迭代' into 'master'
加好友统计 See merge request
!1687
parents
628f110d
45583ff7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletions
+15
-1
InfluxDbMonitorUtils.java
.../gic/haoban/manage/service/util/InfluxDbMonitorUtils.java
+15
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/InfluxDbMonitorUtils.java
View file @
1bdfa01a
package
com
.
gic
.
haoban
.
manage
.
service
.
util
;
package
com
.
gic
.
haoban
.
manage
.
service
.
util
;
import
com.ctrip.framework.apollo.Config
;
import
com.ctrip.framework.apollo.ConfigService
;
import
com.gic.haoban.manage.service.pojo.HBQwMonitorBO
;
import
com.gic.haoban.manage.service.pojo.HBQwMonitorBO
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
...
@@ -29,6 +31,14 @@ public class InfluxDbMonitorUtils {
...
@@ -29,6 +31,14 @@ public class InfluxDbMonitorUtils {
private
static
volatile
InfluxDbMonitorUtils
instance
=
null
;
private
static
volatile
InfluxDbMonitorUtils
instance
=
null
;
private
static
boolean
isDev
=
false
;
static
{
Config
config
=
ConfigService
.
getConfig
(
"COMMON.gic-properties"
);
String
env
=
config
.
getProperty
(
"environment.value"
,
""
);
isDev
=
!
"prod"
.
equals
(
env
);
}
public
static
InfluxDbMonitorUtils
getInstance
()
{
public
static
InfluxDbMonitorUtils
getInstance
()
{
if
(
instance
==
null
)
{
if
(
instance
==
null
)
{
synchronized
(
InfluxDbMonitorUtils
.
class
)
{
synchronized
(
InfluxDbMonitorUtils
.
class
)
{
...
@@ -55,7 +65,11 @@ public class InfluxDbMonitorUtils {
...
@@ -55,7 +65,11 @@ public class InfluxDbMonitorUtils {
}
}
public
void
friendAdd
(
HBQwMonitorBO
bo
)
{
public
void
friendAdd
(
HBQwMonitorBO
bo
)
{
influxDB
.
write
(
Point
.
measurement
(
"hb_qw_friend_monitor"
)
String
tb
=
"hb_qw_friend_monitor"
;
if
(
isDev
)
{
tb
=
"hb_qw_friend_monitor_dev"
;
}
influxDB
.
write
(
Point
.
measurement
(
tb
)
.
time
(
System
.
currentTimeMillis
(),
TimeUnit
.
MILLISECONDS
)
.
time
(
System
.
currentTimeMillis
(),
TimeUnit
.
MILLISECONDS
)
.
addField
(
"num"
,
bo
.
getNum
())
.
addField
(
"num"
,
bo
.
getNum
())
.
addField
(
"failNum"
,
bo
.
getFailNum
())
.
addField
(
"failNum"
,
bo
.
getFailNum
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment