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

tests: Logs timing in tests #53827

Merged
merged 2 commits into from Jan 12, 2019
Merged

Conversation

samueldr
Copy link
Member

Motivation for this change

This is done in two ways:

  • Cherry-picks a particular issue (connecting to guest) and time how long it takes.
  • Time every nest in the logs

The first timing is to track a specific event which might be the cause of our spurious failures in tests. That is, the alarm 300 might be too conservative on the build servers. Without data we cannot know.

The second part is to help track down issues in tests, hopefully tracking down whatever increase in time happened. The time was added as a log line at the end of the nest since there seems to be no way (with the current implementation) to add it as an attribute to the nest tag, since the XML writer thing seems to be made that way; we would have to defer writing the log until the nesting was closed. This should be generally machine-parseable, but I'm not entirely confident whether it should be implemented in another way to allow machine parsing.

Screenshot

image

Things done
  • ✔️ Tested using sandboxing []((nix.useSandbox) on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • ✔️ NixOS
    • 🔲 macOS
    • 🔲 other Linux distributions
  • ✔️ Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • 🔲 Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • 🔲 Tested execution of all binary files (usually in ./result/bin/)
  • 🔲 Determined the impact on package closure size (by running nix path-info -S before and after)
  • ✔️ Assured whether relevant documentation is up to date
  • ✔️ Fits CONTRIBUTING.md.

This will make it possible to track whether the time is generous or not
when ran on hydra.
@timokau
Copy link
Member

timokau commented Jan 12, 2019

Yes please! I don't see any downside to adding some log lines. Lets get this merged as quickly as possible.

@samueldr samueldr merged commit 2646a64 into NixOS:master Jan 12, 2019
@samueldr samueldr deleted the feature/data-in-logs branch February 12, 2019 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants