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
cc46d363
Commit
cc46d363
authored
May 04, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h2load: Refactor statistics hanlding to scale more upcoming new metrics
parent
fa082cbd
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
113 additions
and
180 deletions
+113
-180
src/h2load.cc
src/h2load.cc
+96
-163
src/h2load.h
src/h2load.h
+17
-17
No files found.
src/h2load.cc
View file @
cc46d363
This diff is collapsed.
Click to expand it.
src/h2load.h
View file @
cc46d363
...
...
@@ -94,21 +94,21 @@ struct RequestStat {
bool
completed
;
};
template
<
typename
Duration
>
struct
TimeStat
{
// min, max, mean and sd (standard deviation)
Duration
min
,
max
,
mean
,
sd
;
// percentage of samples inside mean -/+ sd
double
within_sd
;
};
struct
TimeStats
{
// time for request: max, min, mean and sd (standard deviation)
std
::
chrono
::
microseconds
request_time_max
,
request_time_min
,
request_time_mean
,
request_time_sd
;
// percentage of number of requests inside mean -/+ 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
;
// time for request
TimeStat
<
std
::
chrono
::
microseconds
>
request
;
// time for connect
TimeStat
<
std
::
chrono
::
microseconds
>
connect
;
// time to first byte (TTFB)
TimeStat
<
std
::
chrono
::
microseconds
>
ttfb
;
};
enum
TimeStatType
{
STAT_REQUEST
,
STAT_CONNECT
,
STAT_FIRST_BYTE
};
...
...
@@ -148,8 +148,8 @@ struct Stats {
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
>
t
ime_to_first_byte
s
;
// time to first byte
(TTFB)
std
::
vector
<
std
::
chrono
::
steady_clock
::
time_point
>
t
tfb
s
;
};
enum
ClientState
{
CLIENT_IDLE
,
CLIENT_CONNECTED
};
...
...
@@ -236,7 +236,7 @@ struct Client {
void
record_request_time
(
RequestStat
*
req_stat
);
void
record_start_time
(
Stats
*
stat
);
void
record_connect_time
(
Stats
*
stat
);
void
record_t
ime_to_first_byte
(
Stats
*
stat
);
void
record_t
tfb
(
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