Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
crawler
Project
Project
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
backend
crawler
Commits
12da22a9
Commit
12da22a9
authored
Dec 15, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5f4fa23f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
es_locust_answer.py
locust_test/es_locust_answer.py
+0
-0
es_locust_service.py
locust_test/es_locust_service.py
+3
-3
No files found.
locust_test/es_locust_answer.py
0 → 100644
View file @
12da22a9
This diff is collapsed.
Click to expand it.
locust_test/es_locust.py
→
locust_test/es_locust
_service
.py
View file @
12da22a9
# -*- coding:UTF-8 -*-
# -*- coding:UTF-8 -*-
# @Time : 2020/12/11 16:12
# @Time : 2020/12/11 16:12
# @File : es_locust.py
# @File : es_locust
_service
.py
# @email : litao@igengmei.com
# @email : litao@igengmei.com
# @author : litao
# @author : litao
# 运行方式 nohup locust -f locust_test/es_locust.py -H http://172.16.52.25:9200 -u 5000 --headless &
# 运行方式 nohup locust -f locust_test/es_locust
_service
.py -H http://172.16.52.25:9200 -u 5000 --headless &
import
json
import
json
import
time
import
time
from
locust
import
HttpUser
,
task
from
locust
import
HttpUser
,
task
...
@@ -860,7 +860,7 @@ class QuickstartUser(FastHttpUser):
...
@@ -860,7 +860,7 @@ class QuickstartUser(FastHttpUser):
"Content-Type"
:
"application/x-www-form-urlencoded"
"Content-Type"
:
"application/x-www-form-urlencoded"
}
}
response
=
self
.
client
.
post
(
'/gm-dbmw-service-read/_search'
,
json
=
data
,
verify
=
False
,
auth
=
tuple
(
auth
.
split
(
':'
,
1
)))
response
=
self
.
client
.
post
(
'/gm-dbmw-service-read/_search'
,
json
=
data
,
verify
=
False
,
auth
=
tuple
(
auth
.
split
(
':'
,
1
)))
response
=
requests
.
post
(
'http://172.16.52.25/gm-dbmw-service-read/_search'
,
json
=
query
,
verify
=
False
,
auth
=
(
"elastic"
,
"elastic:gengmei!@#"
))
#
response = requests.post('http://172.16.52.25/gm-dbmw-service-read/_search', json=query, verify=False,auth=("elastic","elastic:gengmei!@#"))
# print(response.text)
# print(response.text)
# self.client.get("/hello")
# self.client.get("/hello")
...
...
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