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

Module build duration report #36574

Merged
merged 4 commits into from
Oct 24, 2023
Merged

Conversation

azthec
Copy link
Contributor

@azthec azthec commented Oct 19, 2023

Implementing #36449

Adds a cli jbang script to quickly print out a table of module build times.
I picked a couple of random logs for the example.

Example output

Name of Module                                                                        | Time
----------------------------------------------------------------------------------------------------
...
[907] Integration Tests - OpenID Connect Adapter WireMock                             | 00:00:38:019
[908] Integration Tests - Keycloak Policy Enforcer                                    | 00:01:30:448
[909] Integration Tests - Cross-Site Request Forgery Filter Reactive                  | 00:00:21:460
[910] Integration Tests - Reactive DB2 Client                                         | 00:01:52:127
[911] Integration Tests - Reactive Pg Client                                          | 00:00:19:481
[912] Integration Tests - Reactive MySQL Client - /!\ unfinished                      | 00:00:01:179
----------------------------------------------------------------------------------------------------
Total duration for 912 modules                                                        | 04:42:34:719
----------------------------------------------------------------------------------------------------
...

Example 1

Log

2023-10-09T23:53:34.1426937Z [INFO] Building Quarkus - gRPC - xDS 999-SNAPSHOT                    [484/1057]
....
2023-10-09T23:53:36.6063161Z [INFO] Building Quarkus - gRPC - InProcess 999-SNAPSHOT              [485/1057]

Program

gRPC - xDS                                                                       | 00:00:02:463

36.606s - 34.142s = 02.462s (rounding) correct

Example 2

Log

2023-10-10T00:15:43.2659993Z [INFO] Building Quarkus - Spring Boot - Properties - Runtime 999-SNAPSHOT [598/1057]
...
2023-10-10T00:15:43.5046587Z [INFO] Building Quarkus - Spring Boot - Properties - Deployment 999-SNAPSHOT [599/1057]

Program

Spring Boot - Properties - Runtime                                               | 00:00:00:238

43.504 - 43.265 = .239s (rounding) correct

@quarkus-bot quarkus-bot bot added area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure area/tracing labels Oct 19, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 19, 2023

/cc @brunobat (opentelemetry), @radcortez (opentelemetry)

@azthec azthec force-pushed the module-build-duration-report branch from 36bc436 to 959d571 Compare October 19, 2023 11:27
@gsmet
Copy link
Member

gsmet commented Oct 20, 2023

@azthec thanks! I pushed an additional commit to your branch as I needed some additional features. Please have a look and make sure you update your local branch with this commit before pushing.

@gsmet
Copy link
Member

gsmet commented Oct 20, 2023

@azthec I pushed some additional improvements/fixes and pushed another commit. Could you have a look at the commits and tell me if it looks good for you?

If so, we can probably merge it (and improve it further if needed).

@gsmet
Copy link
Member

gsmet commented Oct 20, 2023

(I did it myself as I needed the script right away to try to understand a failing build)

@azthec
Copy link
Contributor Author

azthec commented Oct 20, 2023

I should have some time tomorrow to polish this PR, good that it's useful! Let me know if you find any edge cases not in the TODO comments

@gsmet
Copy link
Member

gsmet commented Oct 20, 2023

OK, I will let you have a look at what I did. I think it's pretty much done now but better have another pair of eyes :)

@azthec
Copy link
Contributor Author

azthec commented Oct 21, 2023

I changed the format of the module names a bit

  • removed 'Quarkus -' which as far as I saw was always the same everywhere
  • moved the module number to show at the head
[827] Integration Tests - Kafka SASL                                                  | 00:00:28:556
[828] Integration Tests - Kafka SASL with Elytron                                     | 00:00:52:448
[829] Integration Tests - Kafka OAUTH with Keycloak                                   | 00:01:32:995
[830] Integration Tests - Kafka with Snappy                                           | 00:00:32:760

What do you think?

@azthec azthec marked this pull request as ready for review October 21, 2023 09:30
@gsmet gsmet force-pushed the module-build-duration-report branch from 2cee0db to 19edbc2 Compare October 23, 2023 07:58
@@ -39,7 +39,7 @@ public class ModuleBuildDurationReport implements Runnable {

// we will assume the previous module ends on this and a new one begins
private static final Pattern BUILD_START_PATTERN =
Pattern.compile("^" + TIMESTAMP + " \\[INFO\\] Building (.+?) (\\S+-SNAPSHOT).* \\[([0-9]+)/[0-9]+\\]");
Pattern.compile("^" + TIMESTAMP + " \\[INFO\\] Building Quarkus - (.+?) (\\S+-SNAPSHOT).* \\[([0-9]+)/[0-9]+\\]");
Copy link
Member

Choose a reason for hiding this comment

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

I changed that myself because actually not every module starts with Quarkus - . Things in independent-projects/ usually don't so we are missing some modules if you do that.

@gsmet gsmet force-pushed the module-build-duration-report branch from e9a7ce9 to 459bc42 Compare October 24, 2023 11:38
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

I cleaned up the history a bit to avoid having merge commits.

Thanks for your contribution!

@gsmet gsmet merged commit 53cd58f into quarkusio:main Oct 24, 2023
3 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.6 - main milestone Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure area/tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants