Giter Site home page Giter Site logo

Comments (14)

EliSnow avatar EliSnow commented on April 28, 2024 2

I would love to use hyper for HTTP load testing and would want these metrics as part of the results

from hyper.

jdm avatar jdm commented on April 28, 2024 1

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.

seanmonstar avatar seanmonstar commented on April 28, 2024 1

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.

seanmonstar avatar seanmonstar commented on April 28, 2024

Which pieces are desired?

  • DNS time?
  • Connect time
  • Write time
  • Read time

from hyper.

reem avatar reem commented on April 28, 2024

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.

seanmonstar avatar seanmonstar commented on April 28, 2024

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.

znewman01 avatar znewman01 commented on April 28, 2024

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.

znewman01 avatar znewman01 commented on April 28, 2024

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.

seanmonstar avatar seanmonstar commented on April 28, 2024

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.

znewman01 avatar znewman01 commented on April 28, 2024

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.

teburd avatar teburd commented on April 28, 2024

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.

ChrisMacNaughton avatar ChrisMacNaughton commented on April 28, 2024

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.

EliSnow avatar EliSnow commented on April 28, 2024

I believe the Tokio Trace proposal is relevant here.

from hyper.

lneicelis avatar lneicelis commented on April 28, 2024

Any update on this?

from hyper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.