Coder Social home page Coder Social logo

Improve error messages about trippy HOT 4 CLOSED

mpenning avatar mpenning commented on September 25, 2024
Improve error messages

from trippy.

Comments (4)

fujiapple852 avatar fujiapple852 commented on September 25, 2024

@mpenning both of these settings can be specified in various time units including ms, see example:

https://github.com/fujiapple852/trippy?tab=readme-ov-file#usage-examples

trip example.com -i 250ms -g 50ms

Aside: note the grace period setting exists, which you want wish to tweak as well to fully saturate the line.

Perhaps the Trippy help output could be improved to make this more discoverable?

from trippy.

fujiapple852 avatar fujiapple852 commented on September 25, 2024

Regarding:

If --max-round-duration is set lower than --min-round-duration, --min-round-duration should automatically be set to the requested --max-round-duration value.

The current behaviour is to validate these values and error out if the max is lower than the min, which I think is reasonable behaviour. In general I prefer to avoid any “surprising” behaviour where the tool does something the user did not request.

from trippy.

mpenning avatar mpenning commented on September 25, 2024

@mpenning both of these settings can be specified in various time units including ms, see example:

https://github.com/fujiapple852/trippy?tab=readme-ov-file#usage-examples

trip example.com -i 250ms -g 50ms

Aside: note the grace period setting exists, which you want wish to tweak as well to fully saturate the line.

Perhaps the Trippy help output could be improved to make this more discoverable?

Yes, specifically I filed this bug after trying this:

$ trip -i 0.05 4.2.2.2
Error: invalid character at 1
$

I mistakenly assumed that a sub-second value was not possible... if you could return the same error as this one, it would be more clear...

$ trip -i 2 4.2.2.2
Error: time unit needed, for example 2sec or 2ms

from trippy.

fujiapple852 avatar fujiapple852 commented on September 25, 2024

@mpenning this is improved in #1162, for the above example the error will now be:

$ trip -i 0.05 4.2.2.2
error: invalid value '0.05' for '--min-round-duration <MIN_ROUND_DURATION>': expected time unit (i.e. 100ms, 2s, 1000us)

For more information, try '--help'.

This covers all "duration" parameters, namely:

  • min_round_duration
  • max_round_duration
  • grace_duration
  • read_timeout
  • dns_timeout
  • tui_refresh_rate

from trippy.

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.