Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
d6786f75
Commit
d6786f75
authored
Jul 23, 2015
by
Nora Shoemaker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Getting rid of unused fields in Worker
parent
584f5f37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
src/h2load.cc
src/h2load.cc
+9
-3
src/h2load.h
src/h2load.h
+0
-3
No files found.
src/h2load.cc
View file @
d6786f75
...
@@ -731,11 +731,11 @@ void Client::signal_write() { ev_io_start(worker->loop, &wev); }
...
@@ -731,11 +731,11 @@ void Client::signal_write() { ev_io_start(worker->loop, &wev); }
Worker
::
Worker
(
uint32_t
id
,
SSL_CTX
*
ssl_ctx
,
size_t
req_todo
,
size_t
nclients
,
Worker
::
Worker
(
uint32_t
id
,
SSL_CTX
*
ssl_ctx
,
size_t
req_todo
,
size_t
nclients
,
ssize_t
rate
,
Config
*
config
)
ssize_t
rate
,
Config
*
config
)
:
stats
(
req_todo
),
loop
(
ev_loop_new
(
0
)),
ssl_ctx
(
ssl_ctx
),
config
(
config
),
:
stats
(
req_todo
),
loop
(
ev_loop_new
(
0
)),
ssl_ctx
(
ssl_ctx
),
config
(
config
),
id
(
id
),
tls_info_report_done
(
false
),
rate_loop
(
EV_DEFAULT
),
current_second
(
0
),
nconns_made
(
0
),
nclients
(
nclients
),
rate
(
rate
)
{
id
(
id
),
tls_info_report_done
(
false
),
current_second
(
0
),
nconns_made
(
0
),
nclients
(
nclients
),
rate
(
rate
)
{
stats
.
req_todo
=
req_todo
;
stats
.
req_todo
=
req_todo
;
progress_interval
=
std
::
max
((
size_t
)
1
,
req_todo
/
10
);
progress_interval
=
std
::
max
((
size_t
)
1
,
req_todo
/
10
);
nreqs_per_client
=
req_todo
/
nclients
;
auto
nreqs_per_client
=
req_todo
/
nclients
;
nreqs_rem
=
req_todo
%
nclients
;
auto
nreqs_rem
=
req_todo
%
nclients
;
if
(
config
->
is_rate_mode
())
{
if
(
config
->
is_rate_mode
())
{
// create timer that will go off every second
// create timer that will go off every second
...
@@ -1332,6 +1332,12 @@ int main(int argc, char **argv) {
...
@@ -1332,6 +1332,12 @@ int main(int argc, char **argv) {
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
if
(
config
.
is_rate_mode
()
&&
config
.
nconns
<
(
ssize_t
)
config
.
nthreads
)
{
std
::
cerr
<<
"-C, -t: the total number of connections must be greater than or equal "
<<
"to the number of threads."
<<
std
::
endl
;
exit
(
EXIT_FAILURE
);
}
if
(
!
datafile
.
empty
())
{
if
(
!
datafile
.
empty
())
{
config
.
data_fd
=
open
(
datafile
.
c_str
(),
O_RDONLY
|
O_BINARY
);
config
.
data_fd
=
open
(
datafile
.
c_str
(),
O_RDONLY
|
O_BINARY
);
if
(
config
.
data_fd
==
-
1
)
{
if
(
config
.
data_fd
==
-
1
)
{
...
...
src/h2load.h
View file @
d6786f75
...
@@ -184,12 +184,9 @@ struct Worker {
...
@@ -184,12 +184,9 @@ struct Worker {
size_t
progress_interval
;
size_t
progress_interval
;
uint32_t
id
;
uint32_t
id
;
bool
tls_info_report_done
;
bool
tls_info_report_done
;
struct
ev_loop
*
rate_loop
;
ssize_t
current_second
;
ssize_t
current_second
;
ssize_t
nconns_made
;
ssize_t
nconns_made
;
ssize_t
nclients
;
ssize_t
nclients
;
ssize_t
nreqs_per_client
;
ssize_t
nreqs_rem
;
ev_timer
timeout_watcher
;
ev_timer
timeout_watcher
;
ssize_t
rate
;
ssize_t
rate
;
...
...
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