Giter Site home page Giter Site logo

Comments (3)

pouriyajamshidi avatar pouriyajamshidi commented on May 29, 2024 1

Thanks @ravsii 🤝

Sounds good to me.

from tcping.

pouriyajamshidi avatar pouriyajamshidi commented on May 29, 2024

Hey @ravsii,

Not all the decisions we made are fresh in my memory but iircc the use of time.Duration would cause some tricky issues. For instance, we allow the TCP connection a second to establish and we account for that in the timing in a hardcoded way to avoid weird/inaccurate values in reports.

I really need to refresh my memory on this. Let's keep this issue open till I get some time to do a proper dive.

In the meantime you can experiment with it and possibly see if the reports match the "real world" values.

from tcping.

ravsii avatar ravsii commented on May 29, 2024

Thanks, @pouriyajamshidi, understood. I guess those tricky cases come from the same root, which is representing some amount of time as time.Duration.

I would probably try to refactor

tcping/tcping.go

Lines 49 to 53 in 8c3d3b7

type longestTime struct {
start time.Time
end time.Time
duration float64
}

to time.Duration and submit a draft-PR, if the initial results between current version and a new one would match. Even if not, we would at least know why it should be the way as it is now.

from tcping.

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.