diff --git a/README.md b/README.md index b049e5e..d89fdcb 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ ## Overview -Sarin is designed for efficient HTTP load testing with minimal resource consumption. It prioritizes simplicity—features like templating add zero overhead when unused. +Sarin is designed for efficient HTTP load testing with minimal resource consumption. It prioritizes simplicity and features like templating add zero overhead when unused. | ✅ Supported | ❌ Not Supported | | ---------------------------------------------------------- | ------------------------------- | @@ -106,7 +106,7 @@ For detailed documentation on all configuration options (URL, method, timeout, c ## Templating -Sarin supports Go templates in URL paths, methods, bodies, headers, params, cookies, and values. Use the 320+ built-in functions to generate dynamic data for each request. +Sarin supports Go templates in URL paths, methods, bodies, headers, params, cookies, and values. Use the 340+ built-in functions to generate dynamic data for each request. **Example:** diff --git a/docs/configuration.md b/docs/configuration.md index 2cceee7..913ccb0 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,6 +1,6 @@ # Configuration -Sarin supports environment variables, CLI flags, and YAML files. However, they are not exactly equivalent—YAML files have the most configuration options, followed by CLI flags, and then environment variables. +Sarin supports environment variables, CLI flags, and YAML files. However, they are not exactly equivalent: YAML files have the most configuration options, followed by CLI flags, and then environment variables. When the same option is specified in multiple sources, the following priority order applies: @@ -107,9 +107,9 @@ If all four files define `url`, the value from `config3.yaml` wins. **Merge behavior by field:** -- **Scalar fields** (`url`, `requests`, `duration`, `timeout`, `concurrency`, etc.) — higher priority overrides lower priority -- **Method and Body** — higher priority overrides lower priority (no merging) -- **Headers, Params, Cookies, Proxies, Values, Lua, and Js** — accumulated across all config files +- **Scalar fields** (`url`, `requests`, `duration`, `timeout`, `concurrency`, etc.): higher priority overrides lower priority +- **Method and Body**: higher priority overrides lower priority (no merging) +- **Headers, Params, Cookies, Proxies, Values, Lua, and Js**: accumulated across all config files ## URL @@ -408,7 +408,7 @@ SARIN_VALUES="key1=value1" Lua script(s) for request transformation. Each script must define a global `transform` function that receives a request object and returns the modified request object. Scripts run after template rendering, before the request is sent. -If multiple Lua scripts are provided, they are chained in order—the output of one becomes the input to the next. When both Lua and JavaScript scripts are specified, all Lua scripts run first, then all JavaScript scripts. +If multiple Lua scripts are provided, they are chained in order-the output of one becomes the input to the next. When both Lua and JavaScript scripts are specified, all Lua scripts run first, then all JavaScript scripts. **Script sources:** @@ -473,7 +473,7 @@ SARIN_LUA='function transform(req) req.headers["X-Custom"] = "my-value" return r JavaScript script(s) for request transformation. Each script must define a global `transform` function that receives a request object and returns the modified request object. Scripts run after template rendering, before the request is sent. -If multiple JavaScript scripts are provided, they are chained in order—the output of one becomes the input to the next. When both Lua and JavaScript scripts are specified, all Lua scripts run first, then all JavaScript scripts. +If multiple JavaScript scripts are provided, they are chained in order-the output of one becomes the input to the next. When both Lua and JavaScript scripts are specified, all Lua scripts run first, then all JavaScript scripts. **Script sources:** diff --git a/docs/templating.md b/docs/templating.md index dad180f..336627b 100644 --- a/docs/templating.md +++ b/docs/templating.md @@ -236,7 +236,7 @@ Captcha functions solve a captcha challenge through a third-party solving servic The functions are organized by service: `twocaptcha_*`, `anticaptcha_*`, and `capsolver_*`. Each accepts the API key as the first argument so no global configuration is required — bring your own key and use any of the supported services per template. -> **Important — performance and cost:** +> **Important: performance and cost:** > > - **Each call is slow.** Solving typically takes ~5–60 seconds because the function blocks the template render until the third-party service returns a token. Internally the solver polls every 1s and gives up after 120s. > - **Each call costs money.** Every successful solve is billed by the captcha service (typically $0.001–$0.003 per solve). For high-volume tests, your captcha bill grows linearly with request count.