Skip to content

Conversation

@gxcreator
Copy link
Contributor

📦 Package Details

Maintainer: @gxcreator

Description:
lzbench is an in-memory benchmark for open-source compression algorithms. It integrates multiple compression libraries into a single executable and allows for easy comparison of compression speed, decompression speed, and compression ratio.

https://github.com/inikep/lzbench.git


🧪 Run Testing Details

  • OpenWrt Version: SNAPSHOT r31193-605543bc7b
  • OpenWrt Target/Subtarget: Mediatek ARM/MT7622
  • OpenWrt Device: RT3200_UBI (Linksys E8450 UBI)

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

@GeorgeSapkin
Copy link
Member

Please add a commit description with a reason for introducing this package or at least its description.

@gxcreator gxcreator force-pushed the add_lzbench_package branch from ab5cee7 to 2224caa Compare October 1, 2025 16:08
@gxcreator
Copy link
Contributor Author

Please add a commit description with a reason for introducing this package or at least its description.

Done

lzbench is an in-memory benchmark for open-source compression algorithms.
It integrates multiple compression libraries into a single executable.
Allows for easy comparison of compression speed, decompression speed, and compression ratio.
Useful for tweaking nginx/squashfs/etc compression and as CPU benchmarking tool.

Signed-off-by: Nikita Solianik <[email protected]>
@gxcreator gxcreator force-pushed the add_lzbench_package branch from 2224caa to e97940a Compare October 1, 2025 21:28
@gxcreator gxcreator requested a review from BKPepe October 2, 2025 08:20
Copy link
Member

@BKPepe BKPepe left a comment

Choose a reason for hiding this comment

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

I have briefly reviewed this package and have some feedback. However, I will not be using lzbench on the router, and it is uncertain whether others will find it useful. Therefore, I suggest leaving the decision to merge this package into the repository to someone else.

$(MAKE_FLAGS)
endef

TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
Copy link
Member

Choose a reason for hiding this comment

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

I would say this does not make any sense as we are adding cflags below.

Suggested change
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))

I am thinking that we can drop this.

Comment on lines +35 to +38
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(MAKE_FLAGS)
endef
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to have our own Build/Compile section? Can not we use the default one?

Default one is:

define Build/Compile/Default
        +$(MAKE_VARS) \
        $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
                $(MAKE_FLAGS) \
                $(1);
endef

See:
https://github.com/openwrt/openwrt/blob/915a57ccd9086db88ee74cfa531ff13f8652a447/include/package-defaults.mk#L143

I dropped this and it works.

Suggested change
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(MAKE_FLAGS)
endef

@BKPepe BKPepe requested a review from Copilot October 2, 2025 11:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new package called lzbench to the OpenWrt package collection. lzbench is an in-memory benchmark tool for comparing open-source compression algorithms, integrating multiple compression libraries into a single executable for easy performance comparison.

Key changes:

  • New package definition with proper metadata and dependencies
  • Custom build configuration that disables most optional compression libraries to minimize dependencies
  • Standard OpenWrt package structure with install rules

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

$(MAKE) -C $(PKG_BUILD_DIR) \
$(MAKE_FLAGS)
endef

Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

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

The TARGET_CFLAGS optimization level filtering is placed after the Build/Compile definition but before MAKE_FLAGS. This ordering could be confusing. Consider moving this line to be grouped with the MAKE_FLAGS definition or add a comment explaining why optimization flags are being removed.

Suggested change
# Remove optimization flags from TARGET_CFLAGS to avoid overriding package-specific optimization settings

Copilot uses AI. Check for mistakes.
@hnyman
Copy link
Contributor

hnyman commented Oct 2, 2025

I highly doubt that pre-compiling the compression test bench binaries for all our architectures is worthwhile.
So, like BKPepe, I am hesitant to add this. NAK from me.

@BKPepe BKPepe closed this Oct 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants