What Bevel processed

Log a summary of datasets, routes and export results with LogStats, or read the numbers in code with GetBevelStatsAsync.

On this page
Program.cscsharp
builder.AddBevel(options => options.LogStats = true);

Set LogStats and Bevel logs one summary when the app starts and one after each export (--bevel-build or ExportStaticSiteAsync()). It is one Information message under the Bevel category.

Read the summary

text
Bevel (built for Production, data step 808 ms, last data run)
  Dataset           Kind      Items  Files    Time  Removed
  Authors           json          2      1   16 ms
  Navigation        xml           6      1    8 ms
  Releases          loader       14      1   19 ms
  Site              yaml          1      1   22 ms
  Posts             markdown      4      5  105 ms  1 by DropDrafts
  Posts.Archive     group         1           4 ms
  Posts.Categories  group         3           3 ms
  Posts.Tags        group         6           0 ms
  Metrics           loader        1           1 ms
  Routes: 19 pages, 3 files (22 exported, 0 excluded)
  Export: 22 written, 0 unchanged, 0 deleted (123.5 KB)
Part Meaning
Header The environment the data was built for, how long the data step took, and whether it ran in the last build.
Kind markdown, json, yaml, xml, loader or group.
Items How many items. A single object counts as 1.
Files Source files read. For a loader, the files it registered.
Time Time on that dataset: load plus processors.
Removed Items a processor removed, with the processor name.
Routes Pages and other files mapped, and how many exported or were excluded.
Export Files written, unchanged and deleted, and the total size.

A group dataset is named Posts.Tags. The header describes the last time the data step ran. A build that found nothing changed skips the step and keeps those numbers.

Read it in code

csharp
var stats = await app.GetBevelStatsAsync();
stats.WriteTo(Console.Out); // or stats.ToString()

GetBevelStatsAsync is an extension on IHost, so WebApplication works. It returns a BevelStats.

Member Meaning
Environment, DataStepDuration The build environment and how long the whole data step took, including compiling Data/**/*.cs.
Datasets One BevelDatasetStats per dataset, in build order: Name, Kind, Items, Files, Removed, LoadTime and ProcessorTime.
Warnings BevelWarningStats (Code, Message) raised during the data step.
Routes BevelRouteStats: Pages, Files, Exported, Excluded.
Export BevelExportStats (Written, Unchanged, Deleted, TotalBytes) for the last export in this process, otherwise null.

LoadTime covers reading, binding, ordering, [Unique] and references. ProcessorTime is time inside processors. The table shows their sum as Time.

Where the numbers come from

The build records the dataset numbers, timings and warnings as JSON in a generated file, BevelStats.g.cs. It sits apart from the data file, so changing timings never counts as a data change. If several data assemblies exist, you get one entry per assembly.