Skip to content

Commit

Permalink
feat: improve the release profile and add release-slim profile (#580)
Browse files Browse the repository at this point in the history
* feat: improve the release profile and add release-slim profile

* adjust the order of the option for profile

* polish up the comments
  • Loading branch information
ShiKaiWi authored Jan 17, 2023
1 parent 89dca64 commit 0163f60
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
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

0 comments on commit 0163f60

Please sign in to comment.