github.com/square/finch@v0.0.0-20240412205204-6530c03e2b96/docs/content/syntax/all-file.md (about)

     1  ---
     2  title: "_all.yaml"
     3  weight: 3
     4  ---
     5  
     6  The optional all stages file \_all.yaml is YAML format and applies to all stages in the same directory.
     7  It's like a MySQL defaults file (my.cnf): it provides a default configuration that stage files in the same directory inherit but can also override.
     8  
     9  \_all.yaml is _not_ a stage file.
    10  There is no top-level `stage` section.
    11  The only valid top-level sections in \_all.yaml are `mysql`, `parameters`, and `stats`.
    12  These three sections can be specified in a [stage file]({{< relref "syntax/stage-file" >}}) to override \_all.yaml.
    13  
    14  This is a quick reference with fake but syntactically valid values:
    15  
    16  ```yaml
    17  mysql:
    18    db: ""
    19    dsn: ""
    20    hostname: ""
    21    mycnf: ""
    22    password: ""
    23    password-file: ""
    24    socket: ""
    25    timeout-connect: "10s"
    26    username: ""
    27  
    28    disable-auto-tls: false
    29  
    30    tls:
    31  
    32  parameters:
    33    key1: "value1"
    34    keyN: "valueN"
    35  
    36  stats:
    37    disable: false
    38    freq: "5s"
    39    report:
    40      csv:
    41        percentiles: "P95,P99"
    42        # More csv reporter params
    43      stdout:
    44        percentiles: "P999"
    45        # More stdout reporter params
    46  ```
    47  
    48  {{< toc >}}
    49  
    50  ## mysql
    51  
    52  The `mysql` section configures the connection to MySQL for all clients.
    53  
    54  ### db
    55  
    56  Default datbase.
    57  
    58  ### dsn
    59  
    60  Data source.
    61  
    62  ### hostname
    63  
    64  Hostname of MySQL.
    65  
    66  ### mycnf
    67  
    68  my.cnf to read default MySQL configuraiton.
    69  
    70  ### password
    71  
    72  MySQL user password.
    73  
    74  ### password-file
    75  
    76  File to read MySQL user password from.
    77  
    78  ### socket
    79  
    80  MySQL socket.
    81  
    82  ### timeout-connect
    83  * Default: 10s
    84  * Value: [time duration]({{< relref "syntax/values#time-duration" >}}) &ge; 0
    85  
    86  Timeout on connecting to MySQL.
    87  
    88  ### username
    89  
    90  MySQL username
    91  
    92  ---
    93  
    94  ## params
    95  
    96  The `params` section is an optional key-value map of strings.
    97  See [Intro / Concepts / Parameters]({{< relref "intro/concepts#parameters" >}}) and [Syntax / Params]({{< relref "syntax/params" >}}).
    98  
    99  ---
   100  
   101  ## stats
   102  
   103  The `stats` section configure statistics collection and reporting.
   104  By default, Finch prints [statistics]({{< relref "benchmark/statistics" >}}) once, to stdout, when the stage completes. 
   105  Different reporters can be used at the same time, but only one instance of each reporter.
   106  
   107  ### disable
   108  
   109  * Default: false
   110  * Value: boolean
   111  
   112  Disable stats.
   113  For example, you can enable and configure stats once in \_all.yaml for all stages, but disable stats in a [DDL stage]({{< relref "benchmark/overview#ddl" >}}) by specifying:
   114  
   115  ```yaml
   116  # DDL stage
   117  stage:
   118    stats:
   119      disable: true
   120  ```
   121  
   122  ### freq
   123  
   124  * Default: 0 (disabled)
   125  * Value: [time duration]({{< relref "syntax/values#time-duration" >}}) &ge; 0
   126  
   127  How frequently to report periodic stats for all reporters.
   128  (Frequency per reporter is not supported.)
   129  If disabled, only one final report is printed at the end of the stage.
   130  
   131  See [Benchmark / Statistics / Frequency]({{< relref "benchmark/statistics#frequency" >}}).
   132  
   133  ### report
   134  
   135  The `report` section is a map keyed on reporter name ([built-in]({{< relref "benchmark/statistics#reporters" >}}) and [custom]({{< relref "api/stats" >}})).
   136  The value of each map is a key-value map of reporter-specific parameters.
   137  
   138  ```yaml
   139  stats:
   140    report:
   141      stdout:
   142        percentiles: "P95,P99"
   143      csv:
   144        percentiles: "P999"
   145  ```
   146  
   147  See [Benchmark / Statistics / Reporters]({{< relref "benchmark/statistics#reporters" >}}) for `stdout` and `cvs` parameters.