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

[Refactor] Introduce util class for identifying Bazel profile-specific CompleteEvents #125

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

saraadams
Copy link
Collaborator

This is a refactor and code cleanup in preparation for addressing #90

  • moves some static methods over to a new util class that helps identify the meaning of CompleteEvents seen in Bazel profiles
  • adds some missing copyright notices

Base automatically changed from sara-improve-remote-cache-metrics to main November 27, 2023 10:51

import com.engflow.bazel.invocation.analyzer.traceeventformat.CompleteEvent;

public class BazelEventsUtil {

Choose a reason for hiding this comment

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

Suggested change
public class BazelEventsUtil {
public final class BazelEventsUtil {


/**
* The event documents a remote cache check. This includes cache checks against remote caches
* configured by `--remote_cache` or `--disk_cache`.

Choose a reason for hiding this comment

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

nit: I don't know about VSCode, but IntelliJ's JavaDoc renderer doesn't support MarkDown.

Suggested change
* configured by `--remote_cache` or `--disk_cache`.
* configured by {@code --remote_cache} or {@code --disk_cache}.

Comment on lines 28 to 29
* <p>Note that Bazel does not differentiate between a remote cache configured via `--disk_cache` or
* `--remote_cache`.

Choose a reason for hiding this comment

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

Suggested change
* <p>Note that Bazel does not differentiate between a remote cache configured via `--disk_cache` or
* `--remote_cache`.
* <p>Note that Bazel does not differentiate between a remote cache configured via {@code
* --disk_cache} or {@code --remote_cache}.

…c `CompleteEvent`s

* moves some static methods over to a new util class that helps identify the meaning of `CompleteEvent`s seen in Bazel profiles
* adds some missing copyright notices

Signed-off-by: Sara Adams <sara.e.adams@gmail.com>
Signed-off-by: Sara Adams <sara.e.adams@gmail.com>
@saraadams saraadams force-pushed the sara-refactor-extract-completeeventutil branch from bd9ed5b to ca2fb3f Compare November 27, 2023 14:00
@saraadams saraadams merged commit 15feaf4 into main Nov 27, 2023
3 checks passed
@saraadams saraadams deleted the sara-refactor-extract-completeeventutil branch November 27, 2023 14:17
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.

2 participants