EngFlow / bazel_invocation_analyzer

A tool that automatically analyzes a Bazel build's profile and offers suggestions on how to make it faster.
https://analyzer.engflow.com
Apache License 2.0
90 stars 10 forks source link

Invalid Bazel profile, JSON file missing "Main Thread" #68

Closed jotadrilo closed 2 years ago

jotadrilo commented 2 years ago

Description

When running the analyzer, it fails due to an invalid Bazel profile.

Observed behavior

The analyzer fails to process a Bazel profile.

Expected behavior

The analyzer should process the Bazel profile.

Step-by-step guide on how to reproduce the bug

I cannot guarantee how to reproduce this bug, but I will try to craft a small project that does not violate IP rights.

Additional context

NA

Environment

Details about the environment this bug was observed in.

Output

❯ bazel run //cli -- /tmp/profile.gz
WARNING: Ignoring JAVA_HOME, because it must point to a JDK, not a JRE.
INFO: Writing tracer profile to '/private/var/tmp/_bazel_jdrios/0ecdd2402f4a3430676f679c51210c11/command.profile.gz'
INFO: Analyzed target //cli:cli (42 packages loaded, 725 targets configured).
INFO: Found 1 target...
Target //cli:cli up-to-date:
  bazel-bin/cli/cli.jar
  bazel-bin/cli/cli
INFO: Elapsed time: 35.574s, Critical Path: 6.46s
INFO: 34 processes: 4 internal, 14 darwin-sandbox, 16 worker.
INFO: Build completed successfully, 34 total actions
INFO: Build completed successfully, 34 total actions

Bazel Invocation Analyzer by EngFlow

Analyzing /private/tmp/profile.gz
An error occurred while trying to analyze your profile.
Invalid Bazel profile, JSON file missing "Main Thread".

Help improve this tool
You can provide feedback on Bazel Invocation Analyzer as follows:
    https://github.com/EngFlow/bazel_invocation_analyzer/issues to file an issue
    bazel-invocation-analyzer-dev@engflow.com to send us an email
Bazel Invocation Analyzer is open source. We welcome contributions!

File(s) scanned

NA

Further details

NA

jotadrilo commented 2 years ago

Duplicated of #67