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

Optimize the log output of the smart builder #21

Merged
merged 1 commit into from
Mar 8, 2023

Conversation

laeubi
Copy link
Contributor

@laeubi laeubi commented Feb 5, 2023

Currently the smartbuilder prints some messages that are more debug infos at the info level that are hard to understand for the user.

This change do the following:

  • print start/stop messages at the debug level
  • in the summary print only the average project wall time
  • print the total concurrency as percentage
  • if the effective concurrency is lower than 80% print a list of bottlenecks and a hint to the user how to get further details

An example output then might look like this:

[INFO] ------------------------------------------------------------------------
[INFO] Average project wall time: 0,28s
[INFO] Total concurrency: 48 %
[INFO] Bottleneck projects that decrease concurrency: (run build with -Dsmartbuilder.profiling=true for further details)
[INFO] 	- project:a
[INFO] 	- project:b
[INFO] 	- project:c
[INFO] ------------------------------------------------------------------------

@laeubi
Copy link
Contributor Author

laeubi commented Feb 5, 2023

@cstamas can you review?

@laeubi laeubi force-pushed the optimized_log_output branch from bf92a1c to 14a5c95 Compare March 8, 2023 16:19
"Task segments : " + taskSegments.stream().map(Object::toString).collect(Collectors.joining(" ")));
logger.info("Build maximum degree of concurrency is " + degreeOfConcurrency);
logger.info("Total number of projects is " + session.getProjects().size());
logger.debug("Task segments : " + Joiner.on(" ").join(taskSegments));
Copy link
Member

Choose a reason for hiding this comment

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

Can we use {} instead ?

Copy link
Member

Choose a reason for hiding this comment

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

And maybe even a lambda if possible logger.debug("Task segments: {}", () -> Joiner.on(" ").join(taskSegments));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done (as far as slf4j level allows) lamda semm not supported, but I wrapped is in a debugenabled block now.

@laeubi laeubi force-pushed the optimized_log_output branch from 14a5c95 to 230bfac Compare March 8, 2023 16:41
Currently the smartbuilder prints some messages that are more debug
infos at the info level that are hard to understand for the user.

This change do the following:
- print start/stop messages at the debug level
- in the summary print only the average project wall time
- print the total concurrency as percentage
- if the effective concurrency is lower than 80% print a list of
bottlenecks and a hint to the user how to get further details
@laeubi laeubi force-pushed the optimized_log_output branch from 230bfac to 09fe855 Compare March 8, 2023 16:42
@jvanzyl jvanzyl merged commit f15f0a2 into takari:master Mar 8, 2023
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.

3 participants