New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a wider range of link speeds in network maps #7533

Merged
merged 1 commit into from Nov 2, 2017

Conversation

Projects
None yet
4 participants
@khobbits
Contributor

khobbits commented Oct 23, 2017

Add support for links at 25Gbps, 56Gbps, and those faster than 100Gbps.
Will likely need adjusted down as links higher than 100Gbps become common, as 20 width looks a bit silly.

If people would prefer, I could swap those matched to be <= matches, to catch odd link speeds.

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Oct 24, 2017

Member

Great, thanks for looking into this. Might I suggest a function so we can handle all speeds instead of just explicitly defined ones:

    if ($speed > 200000) {
        $width = 20;
    } else {
        // a nice curve
        $width = round(0.75 * pow($speed, 0.271));
    }

Examples:

1:      1
10:     1
100:    3
1000:   5
10000:  9
25000:  12
40000:  13
56000:  15
100000: 17
200000: 20
400000: 20

I was also thinking if we want to tweak things a bit lower, it would stay nice further out:

        $width = round(0.75 * pow($val, 0.242));
1:      1
10:     1
100:    2
1000:   4
10000:  7
25000:  9
40000:  10
56000:  11
100000: 12
200000: 14
300000: 16
400000: 17
800000: 20

Probably need a visual test to find the best values.

Member

murrant commented Oct 24, 2017

Great, thanks for looking into this. Might I suggest a function so we can handle all speeds instead of just explicitly defined ones:

    if ($speed > 200000) {
        $width = 20;
    } else {
        // a nice curve
        $width = round(0.75 * pow($speed, 0.271));
    }

Examples:

1:      1
10:     1
100:    3
1000:   5
10000:  9
25000:  12
40000:  13
56000:  15
100000: 17
200000: 20
400000: 20

I was also thinking if we want to tweak things a bit lower, it would stay nice further out:

        $width = round(0.75 * pow($val, 0.242));
1:      1
10:     1
100:    2
1000:   4
10000:  7
25000:  9
40000:  10
56000:  11
100000: 12
200000: 14
300000: 16
400000: 17
800000: 20

Probably need a visual test to find the best values.

@khobbits

This comment has been minimized.

Show comment
Hide comment
@khobbits

khobbits Oct 24, 2017

Contributor

I was trying to keep changes to a minimum!
Sure, I'll have a test and resubmit/rebase.

Contributor

khobbits commented Oct 24, 2017

I was trying to keep changes to a minimum!
Sure, I'll have a test and resubmit/rebase.

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Oct 24, 2017

Member

$width = round(0.75 * pow($val, 0.242));

This.

Member

laf commented Oct 24, 2017

$width = round(0.75 * pow($val, 0.242));

This.

@khobbits

This comment has been minimized.

Show comment
Hide comment
@khobbits

khobbits Oct 24, 2017

Contributor

After playing with it a bit I was thinking:

$width = round(0.77 * pow($val, 0.25));

10	1
100	2
1000	4
10000	8
25000	10
40000	11
50000	12
56000	12
100000	14
200000	16
400000	19
500000	20

With the larger scale, the difference between 1gig and 10gig is less pronounced, and there is no difference between 40gig and 50gig.

500Gbps is still larger than most connections, and the scale could be adjusted in a few years, if 100mbps starts to fade, and faster connections are more common.

Contributor

khobbits commented Oct 24, 2017

After playing with it a bit I was thinking:

$width = round(0.77 * pow($val, 0.25));

10	1
100	2
1000	4
10000	8
25000	10
40000	11
50000	12
56000	12
100000	14
200000	16
400000	19
500000	20

With the larger scale, the difference between 1gig and 10gig is less pronounced, and there is no difference between 40gig and 50gig.

500Gbps is still larger than most connections, and the scale could be adjusted in a few years, if 100mbps starts to fade, and faster connections are more common.

Add support for a wider range of link speeds when mapping links.
Use a formula to work out link speed on network map, rather than using defined speeds.
@scrutinizer-notifier

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

scrutinizer-notifier Oct 24, 2017

The inspection completed: No new issues

scrutinizer-notifier commented Oct 24, 2017

The inspection completed: No new issues

@laf

laf approved these changes Oct 24, 2017

lgtm

@murrant murrant merged commit ea477e1 into librenms:master Nov 2, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.