-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify the recorder async process by storing and writing just a delta
-- use Stack<int> not Option<int list> to remove the update method -- rewrite the references to AsyncLocal value including the whole of CallStack,instance() -- without the instance/update changes we had dangling metadata-id references that pointed at initializeTrace@### instead
- Loading branch information
1 parent
657a648
commit e64bb8a
Showing
7 changed files
with
313 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net46</TargetFrameworks> | ||
<AssemblyName>AltCover.Async</AssemblyName> | ||
<RootNamespace>AltCover.Recorder</RootNamespace> | ||
<ContinuousIntegrationBuild>false</ContinuousIntegrationBuild> | ||
<DeterministicSourcePaths>false</DeterministicSourcePaths> | ||
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<!-- OtherFlags>$(OtherFlags) - -standalone</OtherFlags --> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> | ||
<DefineConstants>TRACE;DEBUG;CODE_ANALYSIS</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="Library.fs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="FSharp.Compiler.Tools" Version="10.2.3" /> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net46" Version="1.0.2"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Remove="System.ValueTuple" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Update="DotNet.ReproducibleBuilds" Version="1.1.1" /> | ||
<PackageReference Update="FSharp.Core" Version="4.1.18" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace AltCover.Recorder | ||
|
||
open System.Collections.Generic | ||
open System.Threading | ||
|
||
module Instance = | ||
module I = | ||
module private CallTrack = | ||
|
||
let attr = | ||
System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6") | ||
|
||
let value = AsyncLocal<Stack<int>>() | ||
|
||
let instance () = | ||
match value.Value with | ||
| null -> value.Value <- Stack<int>() | ||
| _ -> () | ||
|
||
value.Value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.