Repository: influxdata/influxdb
File: influxdb3/src/commands/serve.rs (Rust)

Code before:
        action
    )]
    pub gen1_duration: Gen1Duration,

    /// The amount of time that the server looks back on startup when populating the in-memory
    /// index of gen1 files. This has two dimensions of impact on performance. The first is in
    /// terms of S3 API usage on startup; the second is in terms of initial memory usage on
    /// startup.
    ///
    /// To get a rough sense of both of these performance impacts, take the --gen1-duration value
    /// and divide that number into this parameter to get the total number of gen1 index snapshots
    /// loaded on startup. You can then take that number and multiply it by a rough approximation
    /// of the gen1 metadata stored in this index to obtain a rough estimate of memory usage.
    ///
    /// Let's say we have the following values:
    ///
    /// * Estimated average of 128 bytes of parquet file metadata
    /// * --gen1-duration value of 10 minutes
    /// * --gen1-lookback-duration value of 1 month
    ///
    /// This leads to 144 files per day for 30 days for a total of 4320 index snapshots read in
    /// (via object store API calls) on startup and a (very rough) memory consumption estimate of
    /// ~533 KB.
    #[clap(
        long = "gen1-lookback-duration",
        env = "INFLUXDB3_GEN1_LOOKBACK_DURATION",
        default_value = "1month",
        action
    )]
    pub gen1_lookback_duration: humantime::Duration,

    /// Interval to flush buffered data to a wal file. Writes that wait for wal confirmation will
    /// take as long as this interval to complete.
    #[clap(
        long = "wal-flush-interval",
        env = "INFLUXDB3_WAL_FLUSH_INTERVAL",
        default_value = "1s",
        action
    )]
    pub wal_flush_interval: humantime::Duration,

    /// The number of WAL files to attempt to remove in a snapshot. This times the interval will
    /// determine how often snapshot is taken.
    #[clap(
        long = "wal-snapshot-size",
        env = "INFLUXDB3_WAL_SNAPSHOT_SIZE",
        default_value = "600",
        action
    )]
    pub wal_snapshot_size: usize,


Review comment (suggestion):
This should go in the help sections, https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt and also https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve_all.txt

If we don't want to do it as part of `--help` then just in `serve_all.txt` would be enough.

Code after:
        default_value = "10m",
        action
    )]
    pub gen1_duration: Gen1Duration,

    /// The amount of time that the server looks back on startup when populating the in-memory
    /// index of gen1 files.
    ///
    /// This has two dimensions of impact on performance. The first is in terms of S3 API usage on
    /// startup; the second is in terms of initial memory usage on startup. To get a rough sense of
    /// both of these performance impacts, take the --gen1-duration value and divide that number
    /// into this parameter to get the total number of gen1 index snapshots loaded on startup. You
    /// can then take that number and multiply it by a rough approximation of the gen1 metadata
    /// stored in this index to obtain a rough estimate of memory usage.
    ///
    /// As an example, let's say we have the following values:
    ///
    /// * Estimated average of 128 bytes of parquet file metadata
    /// * --gen1-duration value of 10 minutes
    /// * --gen1-lookback-duration value of 1 month
    ///
    /// This leads to 144 files per day for 30 days for a total of 4320 index snapshots read in
    /// (via object store API calls) on startup and a (very rough) memory consumption estimate of
    /// ~533 KB.
    #[clap(
        long = "gen1-lookback-duration",
        env = "INFLUXDB3_GEN1_LOOKBACK_DURATION",
        default_value = "1month",
        action
    )]
    pub gen1_lookback_duration: humantime::Duration,

    /// Interval to flush buffered data to a wal file. Writes that wait for wal confirmation will
    /// take as long as this interval to complete.
    #[clap(
        long = "wal-flush-interval",
        env = "INFLUXDB3_WAL_FLUSH_INTERVAL",
        default_value = "1s",
        action
    )]
    pub wal_flush_interval: humantime::Duration,

    /// The number of WAL files to attempt to remove in a snapshot. This times the interval will
    /// determine how often snapshot is taken.
    #[clap(
        long = "wal-snapshot-size",
        env = "INFLUXDB3_WAL_SNAPSHOT_SIZE",
        default_value = "600",
        action
    )]
    pub wal_snapshot_size: usize,