[fx][metrics] fix flaky test

metrics test was using a sleep to account for the background metrics
collection started by fx. This CL changes it to call the metrics methods
directly, instead of calling them via fx.

In addition, this CL also fix a technical debt that the metrics
debugging file was being saved to a hardcoded file in /tmp, potentially
causing issues with multiple source trees debugging metrics calls.

Fixed: 54628
Change-Id: Ie437a4a33a3a74592a6c099d2ab809221354535e
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/405079
Testability-Review: Renato Mangini Dias <mangini@google.com>
Reviewed-by: Jonathan Koren <jdkoren@google.com>
Reviewed-by: Wesley Moy <wesleymoy@google.com>
Commit-Queue: Renato Mangini Dias <mangini@google.com>
3 files changed
tree: fa3a016b66145b9cbb96cfd56af4be24ad2aa328
  1. boards/
  2. build/
  3. bundles/
  4. cts/
  5. docs/
  6. examples/
  7. garnet/
  8. products/
  9. scripts/
  10. sdk/
  11. src/
  12. third_party/
  13. tools/
  14. zircon/
  15. .clang-format
  16. .clang-tidy
  17. .gitattributes
  18. .gitignore
  19. .gn
  20. .style.yapf
  21. AUTHORS
  22. BUILD.gn
  23. CODE_OF_CONDUCT.md
  24. CONTRIBUTING.md
  25. LICENSE
  26. OWNERS
  27. PATENTS
  28. README.md
  29. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.