Skip to content

Fix Linux chart rendering and close four documentation loose ends in Logging - #2

Open
FreeAndNil wants to merge 2 commits into
DevTeam:masterfrom
FreeAndNil:loose-ends-cleanup
Open

Fix Linux chart rendering and close four documentation loose ends in Logging#2
FreeAndNil wants to merge 2 commits into
DevTeam:masterfrom
FreeAndNil:loose-ends-cleanup

Conversation

@FreeAndNil

Copy link
Copy Markdown
Contributor

Render chart text on Linux

build/build.csproj referenced SkiaSharp.NativeAssets.Linux.NoDependencies,
which ships Skia without fontconfig. SKTypeface.FromFamilyName("Arial") in
build/Targets/TextStyle.cs therefore resolved to nothing on Linux, and
dotnet run --project ./build -- readme wrote all 132 charts with no text at
all: no title, no library names, no values. Switching to
SkiaSharp.NativeAssets.Linux pulls in fontconfig, which maps Arial to the
metric-compatible Liberation Sans.

Anyone regenerating charts on Linux today silently produces unusable PNGs, so
this is worth landing on its own regardless of the rest.

Logging documentation

Three findings, all in the Logging category:

  1. workflows/feature-contracts/logging.md documented features 1-8 only.
    FormattedOutput was added as feature 9 and never written up. Added section
    9, sourced from the [MatrixFeature] and [FeatureUnavailable] attributes
    on 09_FormattedOutput.cs and the assertions in LoggingChecks.

  2. Feature 8 had two names. Its id, benchmark class (08_PrepareLogger.cs)
    and chart group all said PrepareLogger, but the display name was
    "Create Logger". Since MatrixChartPaths derives the chart filename from
    the display name, the repo carried both 08-create-logger.png and a stale
    08-prepare-logger.png from before the name changed. Renamed the display
    name to "Prepare Logger" so all four agree, and dropped the orphan.

  3. The overview article was two categories out of date.
    readme/art_overview/{en,ru}_overview.md claimed 6 categories, 40 libraries
    and 67 scenarios; LINQ Queries and ZIP Archives were missing from the table
    entirely and four row counts were stale. The old total was also
    self-inconsistent: its own table summed to 41, not 40. Both tables are now
    rebuilt from reports/*/features.json: 8 categories, 53 libraries, 99
    scenarios. Validation's rating leader is now Microsoft.Extensions.Validation
    rather than DataAnnotations, and the baselines paragraph gained
    System.Linq and System.IO.Compression.

README.md and the two Prepare charts are regenerated. No measurements changed:
the Name field in reports/Logging/{features,benchmarks}.json was relabelled
in place rather than re-benchmarked.

Verification

  • grep -rn "Create Logger\|create-logger" returns nothing.
  • dotnet build src/Matrix.Logging/Matrix.Logging.csproj succeeds with 0 warnings.
  • 08-prepare-logger.png now renders with text and shows all 6 libraries
    including OpenTelemetry, with values matching the current README.
    overview-prepare.png legend reads "Prepare Logger".

build/build.csproj referenced SkiaSharp.NativeAssets.Linux.NoDependencies,
which ships Skia without fontconfig. SKTypeface.FromFamilyName("Arial") in
build/Targets/TextStyle.cs therefore resolved to nothing on Linux and every
chart was written with no text at all: no title, no library names, no values.
Switching to SkiaSharp.NativeAssets.Linux pulls in fontconfig, which maps
Arial to the metric-compatible Liberation Sans.
- workflows/feature-contracts/logging.md documented features 1-8 only; add
  section 9, Formatted Output, from the [MatrixFeature] and [FeatureUnavailable]
  attributes on 09_FormattedOutput.cs and the assertions in LoggingChecks.
- Feature 8 was named PrepareLogger by id, benchmark class and chart group, but
  displayed as "Create Logger". Rename the display name to Prepare Logger so all
  four agree, and drop the orphaned 08-create-logger.png chart.
- readme/art_overview/{en,ru}_overview.md listed 6 categories, 40 libraries and
  67 scenarios; LINQ Queries and ZIP Archives were missing entirely and four row
  counts were stale. Rebuild both tables from reports/*/features.json: 8
  categories, 53 libraries, 99 scenarios. Validation's leader is now
  Microsoft.Extensions.Validation, not DataAnnotations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant