Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
enoch
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DevOps
enoch
Commits
ac142cb4
Commit
ac142cb4
authored
Dec 04, 2019
by
jingbo.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
连续查询ok
parent
15fc5a6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
dbinit.go
pkg/dao/dbinit.go
+7
-7
No files found.
pkg/dao/dbinit.go
View file @
ac142cb4
...
...
@@ -15,19 +15,19 @@ const (
//样本总数:request的总量
ApdexCqAll
=
`CREATE CONTINUOUS QUERY cq_apdex_all ON monitor RESAMPLE FOR 1h BEGIN `
+
`SELECT count(traceId) AS ct_all INTO monitor.autogen.apdex FROM trace_info GROUP BY sys_name, time(1m) fill(1) END;`
`SELECT count(traceId) AS ct_all INTO monitor.autogen.apdex FROM
monitor.autogen.
trace_info GROUP BY sys_name, time(1m) fill(1) END;`
//满意样本:request的响应时间[0, m)秒
ApdexCqSat
=
`CREATE CONTINUOUS QUERY cq_apdex_sat_%s ON monitor RESAMPLE FOR 1h BEGIN `
+
`SELECT count(traceId) AS sat INTO monitor.autogen.apdex FROM trace_info `
+
`WHERE sys_name = '%s' AND
'duration'
< %d `
+
`GROUP BY time(1m) fill(0) END;`
`SELECT count(traceId) AS sat INTO monitor.autogen.apdex FROM
monitor.autogen.
trace_info `
+
`WHERE sys_name = '%s' AND
"duration"
< %d `
+
`GROUP BY
sys_name,
time(1m) fill(0) END;`
//可容忍样本:request的响应时间[m, n)秒
ApdexCqTol
=
`CREATE CONTINUOUS QUERY cq_apdex_tol_%s ON monitor RESAMPLE FOR 1h BEGIN `
+
`SELECT count(traceId) AS tol INTO monitor.autogen.apdex FROM trace_info `
+
`WHERE sys_name = '%s' AND
'duration' >= %d AND 'duration'
< %d `
+
`GROUP BY time(1m) fill(0) END;`
`SELECT count(traceId) AS tol INTO monitor.autogen.apdex FROM
monitor.autogen.
trace_info `
+
`WHERE sys_name = '%s' AND
"duration" >= %d AND "duration"
< %d `
+
`GROUP BY
sys_name,
time(1m) fill(0) END;`
//获取全部服务
SysNameSql
=
"show tag values from trace_info with key = sys_name;"
...
...
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