Skip to content

fix: monitoring artifact sizes with GoReleaser#25

Merged
tmknom merged 1 commit intomainfrom
fix/add-report-sizes
Jan 3, 2025
Merged

fix: monitoring artifact sizes with GoReleaser#25
tmknom merged 1 commit intomainfrom
fix/add-report-sizes

Conversation

@tmknom
Copy link
Copy Markdown
Owner

@tmknom tmknom commented Jan 3, 2025

The report_sizes section in GoReleaser allows you to generate a detailed size report for all release artifacts. This feature is invaluable for tracking artifact growth, maintaining size limits, and troubleshooting issues.


Example Configuration

report_sizes: true

Enabling this setting generates a report that lists the sizes of all artifacts produced during the release process.


Key Benefits

  1. Tracking Binary Growth
    Gain insights into how the sizes of your artifacts evolve over time. This is particularly useful for identifying trends in binary growth as your project scales.

  2. Maintaining Size Limits
    Monitor artifact sizes to ensure they remain within acceptable thresholds, which is especially important for projects with strict size constraints.

  3. Debugging Issues
    Quickly identify unexpected increases in artifact size that could indicate bugs, inefficient code, or unintentional inclusions.


Quoting the GoReleaser documentation:

Report Sizes

You might want to enable this if you want to keep an eye on your binary/package
sizes.

It'll report the size of each artifact of the following types to the build
output, as well as on dist/artifacts.json:

  • Binary
  • UniversalBinary
  • UploadableArchive
  • PublishableSnapcraft
  • LinuxPackage
  • CArchive
  • CShared
  • Header

Here's the available configuration options:

# Whether to enable the size reporting or not.
report_sizes: true

The `report_sizes` section in GoReleaser allows you to generate a **detailed size report** for all release artifacts. This feature is invaluable for tracking artifact growth, maintaining size limits, and troubleshooting issues.

---

### Example Configuration

```yaml
report_sizes: true
```

Enabling this setting generates a report that lists the sizes of all artifacts produced during the release process.

---

### Key Benefits

1. **Tracking Binary Growth**
   Gain insights into how the sizes of your artifacts evolve over time. This is particularly useful for identifying trends in binary growth as your project scales.

2. **Maintaining Size Limits**
   Monitor artifact sizes to ensure they remain within acceptable thresholds, which is especially important for projects with strict size constraints.

3. **Debugging Issues**
   Quickly identify unexpected increases in artifact size that could indicate bugs, inefficient code, or unintentional inclusions.

---

# Quoting the GoReleaser documentation:

- https://goreleaser.com/customization/reportsizes/

## Report Sizes

You might want to enable this if you want to keep an eye on your binary/package
sizes.

It'll report the size of each artifact of the following types to the build
output, as well as on `dist/artifacts.json`:

- `Binary`
- `UniversalBinary`
- `UploadableArchive`
- `PublishableSnapcraft`
- `LinuxPackage`
- `CArchive`
- `CShared`
- `Header`

Here's the available configuration options:

```yaml title=".goreleaser.yaml"
# Whether to enable the size reporting or not.
report_sizes: true
```
@tmknom tmknom merged commit 3efb395 into main Jan 3, 2025
@tmknom tmknom deleted the fix/add-report-sizes branch January 3, 2025 09:28
@github-actions github-actions bot added the bug Something isn't working label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant