microsoft / sarif-sdk

.NET code and supporting files for working with the 'Static Analysis Results Interchange Format' (SARIF, see https://github.com/oasis-tcs/sarif-spec)
Other
192 stars 90 forks source link

Size return values for `EnumeratedArtifact` #2674

Closed michaelcfanning closed 1 year ago

michaelcfanning commented 1 year ago

Size designation should be as conservative as possible in EnumeratedArtifact, specifically preferring IO operations to retrieve file size rather than loading files from disk to compute this value.

This change is driven by an earlier mistake in which we faulted in disk content while generating events. As part of this change, we move the size in bytes data to the scan target event (and move the driver events classes up to the driver assembly where they belong).

Opportunistically, we increase our channel of enumerated objects to 50k. This should have a minimal impact on working set and smooths out CPU utilization for scan scenarios with large #'s of small files.

@suvamM @HulonJenkins