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
09c468a4
Commit
09c468a4
authored
Aug 23, 2017
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sohamm17-master'
parents
1a44b5d5
bcda1c24
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
307 additions
and
63 deletions
+307
-63
src/h2load.cc
src/h2load.cc
+280
-63
src/h2load.h
src/h2load.h
+27
-0
No files found.
src/h2load.cc
View file @
09c468a4
This diff is collapsed.
Click to expand it.
src/h2load.h
View file @
09c468a4
...
...
@@ -85,6 +85,10 @@ struct Config {
// rate at which connections should be made
size_t
rate
;
ev_tstamp
rate_period
;
// amount of time for main measurements in timing-based test
ev_tstamp
duration
;
// amount of time to wait before starting measurements in timing-based test
ev_tstamp
warm_up_time
;
// amount of time to wait for activity on a given connection
ev_tstamp
conn_active_timeout
;
// amount of time to wait after the last request is made on a connection
...
...
@@ -118,6 +122,7 @@ struct Config {
~
Config
();
bool
is_rate_mode
()
const
;
bool
is_timing_based_mode
()
const
;
bool
has_base_uri
()
const
;
};
...
...
@@ -215,6 +220,15 @@ struct Stats {
enum
ClientState
{
CLIENT_IDLE
,
CLIENT_CONNECTED
};
// This type tells whether the client is in warmup phase or not or is over
enum
class
Phase
{
INITIAL_IDLE
,
// Initial idle state before warm-up phase
WARM_UP
,
// Warm up phase when no measurements are done
MAIN_DURATION
,
// Main measurement phase; if timing-based
// test is not run, this is the default phase
DURATION_OVER
// This phase occurs after the measurements are over
};
struct
Client
;
// We use reservoir sampling method
...
...
@@ -250,6 +264,15 @@ struct Worker {
ev_timer
timeout_watcher
;
// The next client ID this worker assigns
uint32_t
next_client_id
;
// Keeps track of the current phase (for timing-based experiment) for the
// worker
Phase
current_phase
;
// We need to keep track of the clients in order to stop them when needed
std
::
vector
<
Client
*>
clients
;
// This is only active when there is not a bounded number of requests
// specified
ev_timer
duration_watcher
;
ev_timer
warmup_watcher
;
Worker
(
uint32_t
id
,
SSL_CTX
*
ssl_ctx
,
size_t
nreq_todo
,
size_t
nclients
,
size_t
rate
,
size_t
max_samples
,
Config
*
config
);
...
...
@@ -260,6 +283,10 @@ struct Worker {
void
sample_client_stat
(
ClientStat
*
cstat
);
void
report_progress
();
void
report_rate_progress
();
// This function calls the destructors of all the clients.
void
stop_all_clients
();
// This function frees a client from the list of clients for this Worker.
void
free_client
(
Client
*
);
};
struct
Stream
{
...
...
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