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

optimize BDDSourceManager #3935

Merged
merged 6 commits into from
May 23, 2019
Merged

optimize BDDSourceManager #3935

merged 6 commits into from
May 23, 2019

Conversation

anothermattbrown
Copy link
Contributor

When no sources are referenced, we don't need a representative of the
active but unreferenced sources. Not having one makes the manager
trivial, which makes source tracking more efficient.

active but unreferenced sources. Not having one makes the manager
trivial, which makes source tracking more efficient.
@batfish-bot
Copy link

This change is Reviewable

Copy link
Member

@dhalperi dhalperi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @anothermattbrown)


projects/batfish-common-protocol/src/test/java/org/batfish/common/bdd/BDDSourceManagerTest.java, line 204 at r1 (raw file):

    Map<String, Configuration> configs = ImmutableMap.of(hostname, config);
    BDDSourceManager mgr = BDDSourceManager.forNetwork(_pkt, configs, true).get(hostname);
    assertTrue(mgr.isTrivial());

no tests where we assert the opposite?

Copy link
Contributor Author

@anothermattbrown anothermattbrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @dhalperi)


projects/batfish-common-protocol/src/test/java/org/batfish/common/bdd/BDDSourceManagerTest.java, line 204 at r1 (raw file):

Previously, dhalperi (Dan Halperin) wrote…

no tests where we assert the opposite?

added some

Copy link
Member

@dhalperi dhalperi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@codecov
Copy link

codecov bot commented May 23, 2019

Codecov Report

Merging #3935 into master will decrease coverage by <.01%.
The diff coverage is 92.3%.

@@             Coverage Diff              @@
##             master    #3935      +/-   ##
============================================
- Coverage     74.86%   74.86%   -0.01%     
- Complexity    24089    24092       +3     
============================================
  Files          2027     2027              
  Lines         96668    96672       +4     
  Branches      11509    11512       +3     
============================================
+ Hits          72367    72369       +2     
- Misses        19044    19050       +6     
+ Partials       5257     5253       -4
Impacted Files Coverage Δ Complexity Δ
.../java/org/batfish/common/bdd/BDDSourceManager.java 96.33% <92.3%> (+1.04%) 48 <9> (+6) ⬆️
.../src/main/java/org/batfish/datamodel/flow/Hop.java 53.33% <0%> (-6.67%) 5% <0%> (-1%)
...org/batfish/datamodel/flow/BidirectionalTrace.java 79.54% <0%> (-4.55%) 13% <0%> (-2%)
...rc/main/java/org/batfish/datamodel/flow/Trace.java 87.09% <0%> (-3.23%) 11% <0%> (-2%)
...ava/org/batfish/datamodel/bgp/Layer2VniConfig.java 85.71% <0%> (-2.86%) 15% <0%> (-1%)
...col/src/main/java/org/batfish/role/InferRoles.java 91.24% <0%> (-0.37%) 68% <0%> (-1%)
...tfish/representation/cisco/CiscoConfiguration.java 83.8% <0%> (-0.13%) 530% <0%> (-1%)
...presentation/cumulus/CumulusNcluConfiguration.java 94.5% <0%> (+0.01%) 128% <0%> (ø) ⬇️
...src/main/java/org/batfish/coordinator/PoolMgr.java 65.16% <0%> (+1.12%) 16% <0%> (+1%) ⬆️
...ain/java/org/batfish/symbolic/IngressLocation.java 68.42% <0%> (+2.63%) 16% <0%> (+1%) ⬆️
... and 2 more

Copy link
Member

@dhalperi dhalperi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Member

@dhalperi dhalperi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r4.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@anothermattbrown anothermattbrown merged commit 361eb12 into master May 23, 2019
@anothermattbrown anothermattbrown deleted the matt-src-mgr branch May 23, 2019 22:02
agember pushed a commit to colgate-cs-research/batfish that referenced this pull request May 28, 2019
* When no sources are referenced, we don't need a representative of the
active but unreferenced sources. Not having one makes the manager
trivial, which makes source tracking more efficient.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants