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
fe6d065b
Commit
fe6d065b
authored
May 03, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ericcarlschwartz-finer_stats'
parents
7b3a33a3
b4e8bea4
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
188 additions
and
35 deletions
+188
-35
src/h2load.cc
src/h2load.cc
+164
-33
src/h2load.h
src/h2load.h
+24
-2
No files found.
src/h2load.cc
View file @
fe6d065b
This diff is collapsed.
Click to expand it.
src/h2load.h
View file @
fe6d065b
...
...
@@ -96,11 +96,23 @@ struct RequestStat {
struct
TimeStats
{
// time for request: max, min, mean and sd (standard deviation)
std
::
chrono
::
microseconds
time_max
,
time_min
,
time_mean
,
time_sd
;
std
::
chrono
::
microseconds
request_time_max
,
request_time_min
,
request_time_mean
,
request_time_sd
;
// percentage of number of requests inside mean -/+ sd
double
within_sd
;
double
request_within_sd
;
// time for connect: max, min, mean and sd (standard deviation)
std
::
chrono
::
microseconds
connect_time_max
,
connect_time_min
,
connect_time_mean
,
connect_time_sd
;
// percentage of number of connects inside mean -/+ sd
double
connect_within_sd
;
// time to first byte: max, min, mean and sd (standard deviation)
std
::
chrono
::
microseconds
ttfb_max
,
ttfb_min
,
ttfb_mean
,
ttfb_sd
;
// percentage of number of connects inside mean -/+ sd
double
ttfb_within_sd
;
};
enum
TimeStatType
{
STAT_REQUEST
,
STAT_CONNECT
,
STAT_FIRST_BYTE
};
struct
Stats
{
Stats
(
size_t
req_todo
);
// The total number of requests
...
...
@@ -132,6 +144,12 @@ struct Stats {
std
::
array
<
size_t
,
6
>
status
;
// The statistics per request
std
::
vector
<
RequestStat
>
req_stats
;
// time connect starts
std
::
vector
<
std
::
chrono
::
steady_clock
::
time_point
>
start_times
;
// time to connect
std
::
vector
<
std
::
chrono
::
steady_clock
::
time_point
>
connect_times
;
// time to first byte
std
::
vector
<
std
::
chrono
::
steady_clock
::
time_point
>
time_to_first_bytes
;
};
enum
ClientState
{
CLIENT_IDLE
,
CLIENT_CONNECTED
};
...
...
@@ -171,6 +189,7 @@ struct Client {
addrinfo
*
next_addr
;
size_t
reqidx
;
ClientState
state
;
bool
first_byte_received
;
// The number of requests this client has to issue.
size_t
req_todo
;
// The number of requests this client has issued so far.
...
...
@@ -215,6 +234,9 @@ struct Client {
void
on_stream_close
(
int32_t
stream_id
,
bool
success
,
RequestStat
*
req_stat
);
void
record_request_time
(
RequestStat
*
req_stat
);
void
record_start_time
(
Stats
*
stat
);
void
record_connect_time
(
Stats
*
stat
);
void
record_time_to_first_byte
(
Stats
*
stat
);
void
signal_write
();
};
...
...
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