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

feat: improve the release profile and add release-slim profile #580

Merged
merged 3 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ repos:
- id: cargo-sort
name: Check Cargo.toml is sorted
entry: cargo-sort
args: ["--workspace"]
language: rust
types: [file, toml]
files: Cargo\.toml
pass_filenames: false

17 changes: 11 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,20 @@ tracing_util = { workspace = true }
[build-dependencies]
vergen = { version = "5", default-features = false, features = ["build", "git"] }

[profile.bench]
debug = true

# This profile optimizes for good runtime performance.
[profile.release]
# reference: https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units
codegen-units = 1
debug = true
# reference: https://doc.rust-lang.org/cargo/reference/profiles.html#lto
lto = true
overflow-checks = true

# This profile optimizes for best runtime performance but with more memory consumption.
[profile.better-release]
# This profile is used to produce a smaller (no symbols) binary with a little bit poorer performance,
# but with a faster speed and low memory consumption required by compiling.
[profile.release-slim]
inherits = "release"
lto = true
codegen-units = 16
debug = false
lto = false
strip = true
2 changes: 1 addition & 1 deletion integration_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Running test

First the sqlness needs to be compiled. Run `cargo build --release` under this folder. It will be compiled to `ceresdb-test` under `$REPO/target/release`.
First the sqlness needs to be compiled. Run `cargo build --bin ceresdb-server` under this folder. It will be compiled to `ceresdb-test` under `$REPO/target/release`.

The binary takes these env variables to run:
- `BINARY_PATH_ENV`: The binary to test.
Expand Down