Skip to content

Instrument Gradle build with metrics. #214

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

Merged
merged 4 commits into from
Jan 31, 2019
Merged

Instrument Gradle build with metrics. #214

merged 4 commits into from
Jan 31, 2019

Conversation

vkryachko
Copy link
Member

Specifically we now report latency and success/failure of each
individual Gradle task.

Specifically we now report latency and success/failure of each
individual Gradle task.
@googlebot googlebot added the cla: yes Override cla label Jan 25, 2019
@vkryachko
Copy link
Member Author

/retest

@vkryachko
Copy link
Member Author

/retest

@vkryachko vkryachko requested a review from VinayGuthal January 29, 2019 17:41
@allisonbm92 allisonbm92 self-requested a review January 30, 2019 20:41
Copy link
Contributor

@ashwinraghav ashwinraghav left a comment

Choose a reason for hiding this comment

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

Review [1/2]

task.getExtensions().add(METRICS_ELAPSED_TIME, System.currentTimeMillis() - startTime);
}

private static long getElapsed(Task task) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: We could either have an equivalent getStart() or write this inline as well

Copy link
Member Author

Choose a reason for hiding this comment

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

fwiw I did not add it because getStart() is needed only in recordElapsed() which is a pretty simple function, otoh getElapsed() is used in a graph traversal so I wanted to keep things simple and readable there.

Set<Task> visited = new HashSet<>();

long totalElapsed = 0;
while (!queue.isEmpty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not often you see graph traversal in a code review 🤣

Copy link
Member Author

Choose a reason for hiding this comment

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

I know, right? :)

@vkryachko
Copy link
Member Author

/retest

2 similar comments
@vkryachko
Copy link
Member Author

/retest

@vkryachko
Copy link
Member Author

/retest

@vkryachko
Copy link
Member Author

/retest

@vkryachko vkryachko merged commit 75c81fd into master Jan 31, 2019
@vkryachko vkryachko deleted the vk.opencensus branch March 19, 2019 14:04
@firebase firebase locked and limited conversation to collaborators Oct 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Override cla size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants