Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioc_sixiang_license
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
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
zengtianlai3
ioc_sixiang_license
Commits
04bffc10
Commit
04bffc10
authored
Jun 10, 2022
by
zengtianlai3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test commit
parent
e09f3d5b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
OperateController.java
...ava/iot/sixiang/license/controller/OperateController.java
+25
-0
No files found.
license/src/main/java/iot/sixiang/license/controller/OperateController.java
View file @
04bffc10
package
iot
.
sixiang
.
license
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
iot.sixiang.license.model.ResResult
;
import
iot.sixiang.license.model.SamMonitor
;
import
iot.sixiang.license.operate.OperateManager
;
...
...
@@ -8,8 +9,10 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
@Slf4j
...
...
@@ -42,4 +45,26 @@ public class OperateController {
return
ResResult
.
success
().
record
(
records
);
}
@GetMapping
(
"monitor/qps"
)
public
ResResult
getQps
(
@RequestParam
(
"type"
)
int
type
)
{
List
<
JSONObject
>
list
=
new
ArrayList
<>();
JSONObject
obj
=
new
JSONObject
();
obj
.
put
(
"x"
,
1
);
obj
.
put
(
"y"
,
2
);
list
.
add
(
obj
);
JSONObject
obj2
=
new
JSONObject
();
obj2
.
put
(
"x"
,
2
);
obj2
.
put
(
"y"
,
2
);
list
.
add
(
obj2
);
JSONObject
obj3
=
new
JSONObject
();
obj2
.
put
(
"x"
,
3
);
obj2
.
put
(
"y"
,
3
);
list
.
add
(
obj3
);
return
ResResult
.
success
().
record
(
list
);
}
}
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