Skip to content

Commit 86878bb

Browse files
committed
prepare 0.0.1
1 parent 1fe509d commit 86878bb

File tree

7 files changed

+90
-148
lines changed

7 files changed

+90
-148
lines changed

Diff for: .github/ISSUE_TEMPLATE/bug_report.md

-33
This file was deleted.

Diff for: .github/ISSUE_TEMPLATE/feature_request.md

-30
This file was deleted.

Diff for: .github/workflows/ci.yml

-44
This file was deleted.

Diff for: .github/workflows/publish.yml

+4-21
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,16 @@
1-
name: Publish
1+
name: Publish new release
22
on:
3-
workflow_dispatch:
4-
inputs:
5-
ci:
6-
description: "CI pipeline name"
7-
required: false
8-
default: "ci.yml"
9-
3+
release:
4+
types: [published]
105
jobs:
11-
Publish:
6+
publish:
127
runs-on: ubuntu-latest
138
steps:
149
- uses: actions/checkout@v3
1510

1611
- name: Inject slug/short variables
1712
uses: rlespinasse/github-slug-action@v4
1813

19-
- name: Check CI status
20-
run: |
21-
output=$(curl -sSL -X GET -G -H "Accept: application/vnd.github.v3+json" -d "branch=${{ env.GITHUB_REF_SLUG }}" -d "event=push" https://api.github.com/repos/${{ github.repository }}/actions/workflows/${{ github.event.inputs.ci }}/runs | jq -r '.workflow_runs[0] | "\(.conclusion)"')
22-
echo "::set-output name=status::$output"
23-
id: check
24-
25-
- name: Abort if CI not successful
26-
if: steps.check.outputs.status != 'success'
27-
run: |
28-
echo ${{ steps.check.outputs.status }}
29-
exit 1
30-
3114
- name: Set up JDK
3215
uses: actions/setup-java@v3
3316
with:

Diff for: .github/workflows/stale.yml

-18
This file was deleted.

Diff for: README.md

+85-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,85 @@
1-
# Build time traker
1+
# build-time-tracker
2+
3+
Gradle plugin that prints the time taken by the tasks in a build.
4+
5+
Console output example:
6+
```
7+
Build finished: 0.643s
8+
9+
:first | 0.229s | 35.61%
10+
:second | 0.412s | 64.07%
11+
```
12+
13+
You can customize the plugin as follows:
14+
15+
## Reporters
16+
### `ConsoleConfiguration`
17+
18+
Parameters:
19+
* `minDuration: Duration` - `optional` minimum task duration for report, default `0` *(all tasks included)*
20+
21+
`build.gradle.kts`:
22+
```
23+
buildTimeTracker {
24+
consoleConfiguration.set(ConsoleConfiguration(Duration.ofMillis(200))
25+
}
26+
```
27+
28+
Console output:
29+
```
30+
Build finished: 0.643s
31+
32+
:first | 0.229s | 35.61%
33+
:second | 0.412s | 64.07%
34+
```
35+
36+
### `CSVConfiguration`
37+
38+
Parameters:
39+
* `reportFile: String` - `required` path for report file
40+
* `minDuration: Duration` - `optional` minimum task duration for report, default `0` *(all tasks included)*
41+
* `includeSystemUserName: Boolean` - `optional` add username to report, default `false`
42+
* `includeSystemOSName: Boolean` - `optional` add os name to report, default `false`
43+
44+
`build.gradle.kts`:
45+
```
46+
buildTimeTracker {
47+
csvConfiguration.set(CSVConfiguration("${project.buildDir}/report/buildStats.csv", Duration.ofMillis(200), true, true))
48+
}
49+
```
50+
51+
`buildStats.csv` output:
52+
```
53+
:first, 229, 2023-06-12T04:59:05.621Z, 2023-06-12T04:59:05.850Z, myusername, Windows 11
54+
:second, 411, 2023-06-12T04:59:05.852Z, 2023-06-12T04:59:06.263Z, myusername, Windows 11
55+
```
56+
57+
### `MarkdownConfiguration`
58+
59+
Parameters:
60+
* `reportFile: String` - `required` path for report file
61+
* `minDuration: Duration` - `optional` minimum task duration for report, default `0` *(all tasks included)*
62+
* `withTableLabels: Boolean` - `optional` add table labels, default `true`
63+
64+
`build.gradle.kts`:
65+
```
66+
buildTimeTracker {
67+
markdownConfiguration.set(MarkdownConfiguration("${project.buildDir}/report/buildStats.md", Duration.ofMillis(0)))
68+
}
69+
```
70+
71+
`buildStats.md` output:
72+
```
73+
#### Build finished: 0.638s
74+
|Task|Duration|Proportion|
75+
|---|---|---|
76+
|:first|0.223s|34.95%|
77+
|:second|0.413s|64.73%|
78+
```
79+
80+
## Minimum Requirements
81+
- Java 11
82+
- Gradle 6.1
83+
84+
## License
85+
Copyright 2022 Abhijit Sarkar - Released under [Apache License v2.0](LICENSE).

Diff for: gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pluginVcsUrl = https://github.com/vacxe/build-time-tracker.git
66
pluginTags = performance, build, metrics
77
pluginId = io.github.vacxe.build-time-tracker
88
pluginDisplayName = build-time-tracker
9-
pluginDescription = Gradle plugin that prints the time taken by the tasks in a build
9+
pluginDescription = Gradle plugin that reporting build statistic for each task
1010
pluginImplementationClass = io.github.vacxe.buildtimetracker.BuildTimeTrackerPlugin
1111
pluginDeclarationName = buildTimeTrackerPlugin
1212

0 commit comments

Comments
 (0)