-
-
Notifications
You must be signed in to change notification settings - Fork 1
Optimize bench server for performance benchmarking #61
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -14,8 +14,9 @@ members = [ | |||||
| "crates/rustapi-jobs", | ||||||
| "crates/cargo-rustapi", | ||||||
|
|
||||||
|
|
||||||
|
|
||||||
| # Benchmark servers | ||||||
| "benches/bench_server", | ||||||
| "benches/actix_bench_server", | ||||||
| "benches/toon_bench", | ||||||
| "benches/rustapi_bench", | ||||||
| ] | ||||||
|
|
@@ -100,6 +101,7 @@ indicatif = "0.17" | |||||
| console = "0.15" | ||||||
|
|
||||||
| # Internal crates | ||||||
| rustapi-rs = { path = "crates/rustapi-rs", version = "0.1.188", default-features = false } | ||||||
| rustapi-core = { path = "crates/rustapi-core", version = "0.1.188", default-features = false } | ||||||
| rustapi-macros = { path = "crates/rustapi-macros", version = "0.1.188" } | ||||||
| rustapi-validate = { path = "crates/rustapi-validate", version = "0.1.188" } | ||||||
|
|
@@ -119,6 +121,29 @@ rustls = { version = "0.23", default-features = false, features = ["ring", "std" | |||||
| rustls-pemfile = "2.2" | ||||||
| rcgen = "0.13" | ||||||
|
|
||||||
| # ============================================ | ||||||
| # Release Profile - Maximum Performance | ||||||
| # ============================================ | ||||||
| [profile.release] | ||||||
| opt-level = 3 | ||||||
| lto = "fat" | ||||||
| codegen-units = 1 | ||||||
| panic = "abort" | ||||||
| strip = true | ||||||
| debug = false | ||||||
|
|
||||||
| # Benchmark Profile - Even more aggressive | ||||||
| [profile.bench] | ||||||
| inherits = "release" | ||||||
| lto = "fat" | ||||||
| codegen-units = 1 | ||||||
|
Comment on lines
+138
to
+139
|
||||||
| lto = "fat" | |
| codegen-units = 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"message":"Hello, World!"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting default-features = false for rustapi-core in the workspace dependencies may break other workspace members that depend on rustapi-core and expect default features (swagger-ui and tracing) to be enabled. Workspace members like rustapi-extras, rustapi-testing, rustapi-toon, rustapi-view, and rustapi-ws use "rustapi-core = { workspace = true }" and will inherit this setting. These crates may fail to compile if they use tracing macros or expect swagger-ui features. Each affected workspace member should either explicitly enable required features or handle the absence of these features gracefully.