Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
spring-boot-starter-dsp
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
shenjiaqing
spring-boot-starter-dsp
Commits
e1b35b0b
Commit
e1b35b0b
authored
Jan 19, 2022
by
shenjiaqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
9b985c0b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
build.gradle
build.gradle
+1
-1
CatUtils.java
...a/cn/com/duiba/spring/boot/starter/dsp/util/CatUtils.java
+13
-0
No files found.
build.gradle
View file @
e1b35b0b
...
@@ -38,7 +38,7 @@ allprojects {
...
@@ -38,7 +38,7 @@ allprojects {
}
}
group
=
"cn.com.duiba.boot"
group
=
"cn.com.duiba.boot"
version
=
"0.0.3
4
"
version
=
"0.0.3
6
"
}
}
subprojects
{
subprojects
{
...
...
spring-boot-starter-dsp-util/src/main/java/cn/com/duiba/spring/boot/starter/dsp/util/CatUtils.java
View file @
e1b35b0b
...
@@ -23,6 +23,19 @@ public final class CatUtils {
...
@@ -23,6 +23,19 @@ public final class CatUtils {
}
}
}
}
/**
* 对callback内部执行的代码加上cat监控
*
* @param callback 要监控耗时的代码段
* @param type
* @param name
* @param <T>
* @return
*/
public
static
<
T
>
T
executeInCatTransaction
(
cn
.
com
.
duibaboot
.
ext
.
autoconfigure
.
core
.
utils
.
CatUtils
.
Callback
<
T
>
callback
,
String
type
,
String
name
)
throws
Throwable
{
return
cn
.
com
.
duibaboot
.
ext
.
autoconfigure
.
core
.
utils
.
CatUtils
.
executeInCatTransaction
(
callback
,
type
,
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