perfview icon indicating copy to clipboard operation
perfview copied to clipboard

Remove unnecessary preprocessor directives

Open sharwell opened this issue 7 years ago • 4 comments

sharwell avatar Jun 04 '17 15:06 sharwell

Codecov Report

Merging #268 into master will increase coverage by 0.12%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #268      +/-   ##
==========================================
+ Coverage   17.44%   17.56%   +0.12%     
==========================================
  Files         213      213              
  Lines      123790   123790              
  Branches    11971    11971              
==========================================
+ Hits        21590    21745     +155     
+ Misses     101189   101186       -3     
+ Partials     1011      859     -152
Flag Coverage Δ
#2017 17.56% <ø> (+0.12%) :arrow_up:
#Debug 17.56% <ø> (+0.12%) :arrow_up:
#Release ?
Impacted Files Coverage Δ
src/TraceEvent/Utilities/command.cs 0% <ø> (ø) :arrow_up:
src/FastSerialization/StreamReaderWriter.cs 73.79% <ø> (ø) :arrow_up:
src/FastSerialization/FastSerialization.cs 51.95% <ø> (ø) :arrow_up:
src/TraceEvent/TraceUtilities/PEFile.cs 1.05% <ø> (ø) :arrow_up:
src/FastSerialization/GrowableArray.cs 61.45% <ø> (ø) :arrow_up:
src/PerfView/StackViewer/PerfDataGrid.xaml.cs 34.02% <0%> (ø) :arrow_up:
...c/TraceEvent/Parsers/ClrPrivateTraceEventParser.cs 19.58% <0%> (+0.03%) :arrow_up:
src/TraceEvent/TraceEvent.cs 63.34% <0%> (+0.1%) :arrow_up:
src/TraceEvent/DynamicTraceEventParser.cs 67.49% <0%> (+0.15%) :arrow_up:
src/TraceEvent/TraceLog.cs 61.25% <0%> (+0.2%) :arrow_up:
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ed9cc8d...9681008. Read the comment docs.

codecov-io avatar Jun 04 '17 15:06 codecov-io

We should not remove these until we figure out some packaging issues. We may wish to keep them forever.

These directives are an artifact of the fact that we built both the TraceEvent Nuget package (currently built from a non-GIT branch of this code but we want to build it here), and in this package utility functionality should be internal.

Previously (and is still the case), we build a special version of TraceEvent that is used by perfView and to avoid cloning, in this version we make these utility methods public (since we need them from outside the TraceEvent DLL).

Ultimately we do want PerfView to NOT create its own version o TraceEvent but to use the Nuget version. If we do that we either need to

  1. Use the source code in both projects (as internal?)
  2. Make several small Nuget packages for the functionality.

I would prefer that we don't rip out the #ifdefs until the ultimate packaging scheme implemented.

vancem avatar Jun 05 '17 00:06 vancem

Another option is to keep the types exposed by the TraceEvent assembly for now, and if it ever becomes an issue where you want to reference FastSerialization, PEFile, or Command but don't want to reference TraceEvent, we can move one or more items to their own NuGet package and add a [TypeForwardedTo] to the TraceEvent library. I'm not currently convinced such a situation will arise, suggesting we can avoid some complexity by just shipping one package.

sharwell avatar Jun 05 '17 15:06 sharwell

Updated after repository rewrite

sharwell avatar Feb 02 '18 12:02 sharwell