{"record":{"id":"42fa1b2fd09b5d12","repo":"dotnet/BenchmarkDotNet","slug":"defaultmaxparametercolumnwidth-is-the-minimum","errorCode":null,"errorMessage":"{DefaultMaxParameterColumnWidth} is the minimum.","messagePattern":"(.+?) is the minimum\\.","errorType":"exception","errorClass":"ArgumentOutOfRangeException","httpStatus":null,"severity":"error","filePath":"src/BenchmarkDotNet/Reports/SummaryStyle.cs","lineNumber":38,"sourceCode":"        public bool PrintUnitsInContent { get; }\n        public bool PrintZeroValuesInContent { get; }\n        public int MaxParameterColumnWidth { get; }\n        public SizeUnit? SizeUnit { get; }\n        internal SizeUnit CodeSizeUnit { get; }\n        public TimeUnit? TimeUnit { get; }\n        public CultureInfo CultureInfo { get; }\n\n        public RatioStyle RatioStyle { get; }\n\n        public TextJustification TextColumnJustification { get; }\n        public TextJustification NumericColumnJustification { get; }\n\n        public SummaryStyle(CultureInfo? cultureInfo, bool printUnitsInHeader, SizeUnit? sizeUnit, TimeUnit? timeUnit, bool printUnitsInContent = true,\n            bool printZeroValuesInContent = false, int maxParameterColumnWidth = DefaultMaxParameterColumnWidth, RatioStyle ratioStyle = RatioStyle.Value,\n            TextJustification textColumnJustification = TextJustification.Left, TextJustification numericColumnJustification = TextJustification.Right)\n        {\n            if (maxParameterColumnWidth < DefaultMaxParameterColumnWidth)\n                throw new ArgumentOutOfRangeException(nameof(maxParameterColumnWidth), $\"{DefaultMaxParameterColumnWidth} is the minimum.\");\n\n            CultureInfo = cultureInfo ?? DefaultCultureInfo.Instance;\n            PrintUnitsInHeader = printUnitsInHeader;\n            PrintUnitsInContent = printUnitsInContent;\n            SizeUnit = sizeUnit;\n            TimeUnit = timeUnit;\n            MaxParameterColumnWidth = maxParameterColumnWidth;\n            RatioStyle = ratioStyle;\n            CodeSizeUnit = SizeUnit.B;\n            PrintZeroValuesInContent = printZeroValuesInContent;\n            TextColumnJustification = textColumnJustification;\n            NumericColumnJustification = numericColumnJustification;\n        }\n\n        public SummaryStyle WithTimeUnit(TimeUnit timeUnit)\n            => new SummaryStyle(CultureInfo, PrintUnitsInHeader, SizeUnit, timeUnit, PrintUnitsInContent, PrintZeroValuesInContent, MaxParameterColumnWidth,\n                RatioStyle, TextColumnJustification, NumericColumnJustification);\n","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/dotnet/BenchmarkDotNet/blob/b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3/src/BenchmarkDotNet/Reports/SummaryStyle.cs#L20-L56","documentation":"Thrown by the SummaryStyle constructor when maxParameterColumnWidth is set below DefaultMaxParameterColumnWidth. SummaryStyle controls how benchmark summary tables are rendered, including the maximum width of parameter columns. The guard `maxParameterColumnWidth < DefaultMaxParameterColumnWidth` prevents values that would truncate or break the column layout.","triggerScenarios":"Constructing a new SummaryStyle with maxParameterColumnWidth set to a value smaller than the library default constant, e.g. new SummaryStyle(..., maxParameterColumnWidth: 5) when DefaultMaxParameterColumnWidth is larger.","commonSituations":"Trying to make output more compact for narrow terminals or logs by reducing column width below the floor. Copying a config from an older version where the default was smaller.","solutions":["Use a value >= DefaultMaxParameterColumnWidth (check the constant value in the library).","Use SummaryStyle.Default and modify only the properties you need via with-expressions or the builder API.","If you need narrower columns, accept the default minimum and shorten parameter names/values instead."],"exampleFix":"// before\nvar style = new SummaryStyle(\n    cultureInfo: CultureInfo.InvariantCulture,\n    printUnitsInHeader: false,\n    sizeUnit: null,\n    timeUnit: null,\n    maxParameterColumnWidth: 5);\n\n// after\nvar style = new SummaryStyle(\n    cultureInfo: CultureInfo.InvariantCulture,\n    printUnitsInHeader: false,\n    sizeUnit: null,\n    timeUnit: null,\n    maxParameterColumnWidth: SummaryStyle.DefaultMaxParameterColumnWidth);","handlingStrategy":"validation","validationCode":"int width = Math.Max(requestedWidth, SummaryStyle.DefaultMaxParameterColumnWidth);\nvar style = new SummaryStyle(..., maxParameterColumnWidth: width);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use SummaryStyle.Default as the base and modify individual properties rather than constructing from scratch.","Check the value of DefaultMaxParameterColumnWidth constant before passing a custom width.","Clamp user-provided width values to the minimum before construction."],"tags":["configuration","argument-out-of-range","summary-style"],"backgroundTag":null,"analyzedSha":"b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3","analyzedAt":"2026-08-13T19:12:24.196Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}