Skip to content

Commit

Permalink
Merge pull request #1557 from brson/cli-calc-defaults
Browse files Browse the repository at this point in the history
Calculate default values in CLI help message.
  • Loading branch information
matklad committed Feb 19, 2024
2 parents 9c07bca + 2f7c78f commit fc11cc7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/tigerbeetle/cli.zig
Expand Up @@ -126,13 +126,13 @@ const CliArgs = union(enum) {
\\ and should be set as large as possible.
\\ On a machine running only TigerBeetle, this is somewhere around
\\ (Total RAM) - 3GB (TigerBeetle) - 1GB (System), eg 12GB for a 16GB machine.
\\ Defaults to 1GB.
\\ Defaults to {[default_cache_grid_gb]d}GB.
\\
\\ --memory-lsm-manifest=<size><KB|MB|GB>
\\ Sets the amount of memory allocated for LSM-tree manifests. When the
\\ number or size of LSM-trees would become too large for their manifests to fit
\\ into memory the server will terminate.
\\ Defaults to 64MB.
\\ Defaults to {[default_memory_lsm_manifest_mb]d}MB.
\\
\\ --verbose
\\ Print compile-time configuration along with the build version.
Expand All @@ -158,6 +158,14 @@ const CliArgs = union(enum) {
, .{
.default_address = constants.address,
.default_port = constants.port,
.default_cache_grid_gb = @divExact(
constants.grid_cache_size_default,
1024 * 1024 * 1024,
),
.default_memory_lsm_manifest_mb = @divExact(
constants.lsm_manifest_memory_size_default,
1024 * 1024,
),
});
};

Expand Down

0 comments on commit fc11cc7

Please sign in to comment.