Skip to content
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

Simple linear port graph prediction #10520

Merged
merged 3 commits into from Aug 20, 2019

Conversation

@murrant
Copy link
Member

commented Aug 14, 2019

Simple linear prediction line for in and out if graph "to" value is in the future
Improve graph date handling

image

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
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

Simple linear port graph prediction
Simple linear prediction line for in and out if graph "to" value is in the future
Improve graph date handling
$this->assertEquals(212334234, parse_at_time(212334234));
$this->assertEquals(time()-43, parse_at_time('-43'), '-43 did not match');
$this->assertEquals(0, parse_at_time('invalid'));
$this->assertEquals(606636000, parse_at_time('March 23 1989'));

This comment has been minimized.

Copy link
@Jellyfrog

Jellyfrog Aug 14, 2019

Member

This will depend on your timezone.

>>> date_default_timezone_get()
=> "UTC"
>>> strtotime('March 23 1989')
=> 606614400

>>> date_default_timezone_set('America/Los_Angeles');
=> true
>>> date_default_timezone_get()
=> "America/Los_Angeles"
>>> strtotime('March 23 1989')
=> 606643200

Maybe just set the timezone in the test setup

@PipoCanaja

This comment has been minimized.

Copy link
Contributor

commented Aug 15, 2019

Quick test here, good result so far.

@PipoCanaja
Copy link
Contributor

left a comment

Tested all right

@murrant murrant merged commit 8d669a8 into librenms:master Aug 20, 2019

6 checks passed

Inspection Summary
Details
Node: analysis
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
codeclimate All good!
Details
license/cla Contributor License Agreement is signed.
Details

@murrant murrant deleted the murrant:graph-linear-prediction branch Aug 20, 2019

@murrant

This comment has been minimized.

Copy link
Member Author

commented Sep 3, 2019

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/v1-55-release-changelog-august-2019/9428/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.