recommend_limits.cfg.example #1

  • //
  • guest/
  • russell_jackson/
  • sdp/
  • Server/
  • Unix/
  • p4/
  • common/
  • bin/
  • recommend_limits.cfg.example
  • View
  • Commits
  • Open Download .zip Download (1 KB)
##############################################################################
# recommend_limits.py - ADX config example
#
# Copy this file to "recommend_limits.cfg" (same directory) and fill in
# real values. recommend_limits.cfg itself is listed in sdp/.p4ignore and
# must never be added/submitted - this is a public depot, and a cluster/
# database name identifies a specific organization's private
# infrastructure. Only this .example file (with placeholder values) is
# meant to be checked in.
#
# --config PATH can point recommend_limits.py --adx at a config file
# anywhere else instead, if you'd rather keep it outside this tree
# entirely.
##############################################################################

[adx]

# ADX cluster URL and database name. Both required for --adx unless
# overridden with --adx-cluster/--adx-database on the command line.
cluster = https://your-cluster.kusto.windows.net
database = your_database

# Default lookback window when --adx-start is omitted, in days.
default_lookback_days = 7

# ADX caps a single query's response size. --adx bisects the requested
# time range and retries each half automatically when a query comes back
# "result set too large", down to this floor (in hours, fractional
# values allowed, e.g. 0.5 for 30 minutes). Lower it for a very busy
# environment/port if bisection still can't find a chunk that fits;
# raise it to reduce the number of ADX queries issued for a quieter one.
min_chunk_hours = 1
# Change User Description Committed
#1 33581 Russell C. Jackson (Rusty) recommend_limits.py: add ADX data source with configurable date range; externalize ADX settings to recommend_limits.cfg; remove MaxLockTime 90s cap

- fetch_records_from_adx() pulls per-command metrics from Azure Data
  Explorer (PerforceEventType9/PerforceEventType2) as an alternative to a
  local log file, filtered by --p4-port and/or --environment, with
  --adx-start/--adx-end defaulting to the last N days. Automatically
  bisects the time range and retries when ADX reports a result set too
  large for one query.
- All ADX cluster/database/tuning values now come from an INI config
  file (recommend_limits.cfg, p4-ignored - never checked in) instead of
  being hardcoded in the script, since this is a public depot.
  recommend_limits.cfg.example documents the format with placeholder
  values.
- MaxLockTime is now computed the same percentile-driven way as
  MaxResults/MaxScanRows/MaxMemory, instead of being capped at a fixed
  90000ms.