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

Log the compatibility paths #3073

Merged
merged 2 commits into from
Jul 18, 2021

Conversation

eggrobin
Copy link
Member

Add a time-based LOG_IF_EVERY (as opposed to count-based like LOG_IF_EVERY_N) to avoid spamming about every trajectory, polynomial, vessel, part, etc..

With this change (and logging WARNING to stderr) the test added in #3070 prints

[ RUN      ] PluginCompatibilityTest.PreCohen
E0718 17:50:59.961947 24484 plugin_compatibility_test.cpp:65] Deserialization starting
W0718 17:50:59.975911 17736 ephemeris_body.hpp:793] Reading pre-Ἐρατοσθένης Ephemeris
W0718 17:50:59.976277 17736 rotating_body_body.hpp:196] Reading pre-del Ferro RotatingBody
W0718 17:50:59.976506 17736 continuous_trajectory_body.hpp:399] Reading pre-Cohen ContinuousTrajectory
W0718 17:50:59.984709 17736 vessel.cpp:406] Reading pre-Cesàro Vessel
W0718 17:50:59.985708 17736 part.cpp:269] Reading pre-Cesàro Part
W0718 17:50:59.986559 17736 discrete_trajectory_body.hpp:620] Reading pre-Frobenius PolynomialInMonomialBasis
W0718 17:50:59.986711 17736 plugin.cpp:1456] Reading pre-Cauchy Plugin
W0718 17:50:59.987212 17736 pile_up.cpp:220] Reading pre-Cesàro PileUp
E0718 17:50:59.987573 24484 plugin_compatibility_test.cpp:78] Deserialization complete
E0718 17:50:59.988317 24484 plugin_compatibility_test.cpp:92] Serialization starting
E0718 17:51:00.008291 24484 plugin_compatibility_test.cpp:104] Serialization complete
E0718 17:51:00.054144 24484 plugin_compatibility_test.cpp:65] Deserialization starting
E0718 17:51:00.071099 24484 plugin_compatibility_test.cpp:78] Deserialization complete
[       OK ] PluginCompatibilityTest.PreCohen (191 ms)

It should probably be renamed in a future pull request.

std::chrono::steady_clock::now(), \
"")

#define LOG_IF_EVERY_SECOND(severity, condition) \
Copy link
Member

Choose a reason for hiding this comment

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

Let's stick to the Google naming (I think it has EVERY_N_SECOND or SECONDS. That will make migration to absl easier.

Sorry, something went wrong.

Copy link
Member Author

Choose a reason for hiding this comment

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

std::chrono::duration is nice. Let’s see what the absl thing ends up looking like once it exists.

Sorry, something went wrong.

@pleroy pleroy added the LGTM label Jul 18, 2021
@eggrobin eggrobin merged commit ecebea3 into mockingbirdnest:master Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants