Comments (14)
I would love to use hyper for HTTP load testing and would want these metrics as part of the results
from hyper.
I think we want the ability to measure all of the applicable properties in https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html .
from hyper.
I imagine checking the clock several times when you don't want it would cause slow down. I'm thinking these could be events that can receive closures to echoed anything. By default, there's no closure. So you only pay for what you use.
from hyper.
Which pieces are desired?
- DNS time?
- Connect time
- Write time
- Read time
from hyper.
Probably all of those in addition to how long hyper itself takes for things like parsing.
On Wed, Sep 24, 2014 at 8:35 PM, Sean McArthur [email protected]
wrote:
Which pieces are desired?
- DNS time?
- Connect time
- Write time
- Read time
Reply to this email directly or view it on GitHub:
#56 (comment)
from hyper.
For reference:
interface PerformanceTiming {
readonly attribute unsigned long long navigationStart;
readonly attribute unsigned long long unloadEventStart;
readonly attribute unsigned long long unloadEventEnd;
readonly attribute unsigned long long redirectStart;
readonly attribute unsigned long long redirectEnd;
readonly attribute unsigned long long fetchStart;
readonly attribute unsigned long long domainLookupStart;
readonly attribute unsigned long long domainLookupEnd;
readonly attribute unsigned long long connectStart;
readonly attribute unsigned long long connectEnd;
readonly attribute unsigned long long secureConnectionStart;
readonly attribute unsigned long long requestStart;
readonly attribute unsigned long long responseStart;
readonly attribute unsigned long long responseEnd;
readonly attribute unsigned long long domLoading;
readonly attribute unsigned long long domInteractive;
readonly attribute unsigned long long domContentLoadedEventStart;
readonly attribute unsigned long long domContentLoadedEventEnd;
readonly attribute unsigned long long domComplete;
readonly attribute unsigned long long loadEventStart;
readonly attribute unsigned long long loadEventEnd;
};
from hyper.
For reference, my simple benchmark of time::precise_time_ns
gives an average of 24ns per invocation:
extern crate test;
extern crate time;
use test::Bencher;
#[bench]
fn bench_precise_time_ns(b: &mut Bencher) {
b.iter(|| time::precise_time_ns());
}
On my computer, the Hyper benchmark is 137,963ns, Β±63387ns. So you'd have to check the clock 50 times to see a 1% increase. Is that acceptably low enough to do on each invocation (there are 21 timings listed in the W3C document, but several of them seem to be irrelevant (e.g. the DOM-related timings))?
Of course, it makes sense to answer this question by taking real benchmarks of the timing code in Hyper, but that was slightly more work π
from hyper.
I'm interested because I'd like to implement HTTP archive output for Servo, which depends to an extent on being able to pull this information out of Hyper.
If nobody works on this issue before I finish up the other parts of that task, I'd be interested on taking it on. But in the meantime, anyone else should feel free to claim it.
from hyper.
Oh, that's not much time. I thought at some point someone told me that getting the date for the date header was showing up in profiles.
from hyper.
Similar benchmarks show time::now_utc()
at around 75ns.
Perhaps it's the actual formatting step that's taking longer. That part would pretty easy to do only as-demanded.
from hyper.
Closures or a Trait impl, a Trait impl might be nicer if your doing something like sending off the metrics gathered to another metrics recorder service
from hyper.
I would love to be able to get access to more granular timing information as well for a project I'm working on.
from hyper.
I believe the Tokio Trace proposal is relevant here.
from hyper.
Any update on this?
from hyper.
Related Issues (20)
- Help with Frame Mapping HOT 5
- Data race while re-using IDLE connection, connection reset by peer HOT 4
- Missing safety comment: which variants are upheld? HOT 1
- Sleep::downcast_mut_pin() should not extend lifetime HOT 1
- need help hyper::Error(User(ManualUpgrade))
- Hang with no activity in certain high-concurrency situations HOT 5
- neither hyper 1.0 upgrade guide nor the changelog explains how to upgrade usage of `Server` to 1.0 HOT 3
- http2 using BufList.
- how can use http2 server Add a trailers frame after a normal response ? HOT 1
- Is there a way to connect to a websocket using a Hyper client?
- Documentation for `header_read_timeout` is incomplete HOT 5
- Provide HTTP/2 server example in the website HOT 2
- hyper v1 proxy example HOT 1
- Flaky benchmark for http2 with adaptive window HOT 1
- proto/h1: spurious copy-allocation in request parsing hotpath HOT 4
- graceful shutdown does not shutdown when i use Google Chromeγ HOT 4
- hyper-util: add test for graceful shutdown
- The performance problem of hyper v1 gateway of http1 with the log4rs HOT 5
- hyper-util auto version detection breaks the ability to use `Upgraded::downcast` HOT 2
- http1.1 protocol downgrade
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyper.