profile

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Renamed src/main/groovy to src/main/java in core

    • -40
    • +0
    ./ReportGeneratingProfileListener.java
  1. … 2536 more files in changeset.
Replace usage of `String#format` with good old string concatenation

The rationale behind this change is that while `String#format` is usually admitted as good for readability (this is arguable),

in practice it is very bad for performance. Since Java 6, the JVM (the JIT, to be correct) does a pretty good job at optimizing

string concatenation. However, it is only capable to do so if we're using "dirty" string concatenations (using `+`), or `StringBuilder`.

However, usage of `StringBuilder` is not recommended either for 2 reasons:

1. it significantly decreases code readability

2. in Java 9, String concatenation is even more optimized thanks to `invokedynamic`, and code using `StringBuilder` will *not* benefit

from this optimization.

There are sill leftover `String#format` calls in the code, in the following cases:

- the call is used to generate an exception message. That's 90% of the remaining calls.

- the call is obviously a debug message, often used in `toString` (because as we all know, `toString` should only be used for debugging)

- the format includes specific number formatting patterns

- I missed it

  1. … 226 more files in changeset.
Prevent NPE in ProfileEventAdapter.completed

- sometimes completed method gets called before buildStarted

has been called and this currently results in a NPE

Resolve CSS and JS resource urls at most once per TabbedPageRenderer implementation instead of once per rendering.

+review REVIEW-5413

  1. … 2 more files in changeset.
Moved a few classes to live in org.gradle.internal.xml and org.gradle.internal.html

  1. … 63 more files in changeset.
Changed HtmlReportRenderer to allow page to be generated to a Writer in addition to SimpleHtmlWriter.

  1. … 8 more files in changeset.
Fixed generation of links to stylesheets and javascript in test report pages.

  1. … 8 more files in changeset.
Changed HtmlReportRenderer so that it copies resources once after all pages have been generated, instead of once per page.

  1. … 6 more files in changeset.
Merged TextReportRenderer into HtmlReportRenderer

  1. … 5 more files in changeset.
add direct measurement of configuration phase to BuildProfile

Introduced BuildCompletionListener and use this in the profile reporting to determine the build end time. This means the profile report will cover tearing down the build services.

  1. … 4 more files in changeset.
Renamed Operation.comparator() to slowestFirst().

Removed some unnecessary method overrides.

Always take timestamp as early as possible in profile event listener.

Profile report - added some stuff needed by discovery (I removed it earlier accidentally).

Tweaked the sorting of profile report operations so that if elapsed time is the same, the description of the operation is used. This way we guarantee that the tests are not flaky and the order of items is consistent.

  1. … 1 more file in changeset.
Profile report - added some stuff needed by discovery (I removed it earlier accidentally).

Profile report refactoring - removed some code after finding common abstraction.

REVIEW-1714 Refactored the logic behind sorting the items of the profile report and added coverage. We could push further and more improvements, like sorting alphabetically when elapsed time is the same, using tree sets to avoid redundant creation of collections. For now what's included in the commit should be enough.

  1. … 2 more files in changeset.
Made the total configuration time in the "Summary" tab consistent with the value "All projects" in the "Configuration" tab. This way, the report no longer looks unsmart presenting different numbers for the same operation. The figures on the summary tab don't add up to the total build time and they never did AFAIR. I think this is a minor issue. Removed some no longer needed code in the BuildProfile.

  1. … 1 more file in changeset.
Profile report coverage and refactoring. Added coverage for task duration.

  1. … 2 more files in changeset.
Profile report coverage and refactoring. Added coverage for task status information.

  1. … 1 more file in changeset.
Profile report coverage and refactoring. Rename job for consistency.

  1. … 1 more file in changeset.
Removed dead code from ProjectProfile

Added coverage for project evaluation time in the profile report.

    • -0
    • +30
    ./ConfigurationOperation.java
  1. … 3 more files in changeset.
Added coverage for dependency resolution time in the profile report.

  1. … 1 more file in changeset.
Put back some code that is needed by discovery

  1. … 2 more files in changeset.
Decoupled BuildProfile from Gradle types a bit to ease testing.

  1. … 1 more file in changeset.
REVIEW-1707 Made the failure processing consistent in old / new resolution results model.

Some refactoring and more coverage in the profile report.

  1. … 1 more file in changeset.