Skip to content

Commit

Permalink
Add dotTrace snapshotting
Browse files Browse the repository at this point in the history
  • Loading branch information
WorkingRobot committed Nov 10, 2023
1 parent abc5dcf commit 334810c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Benchmark/Bench.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Diagnostics.dotTrace;
using Craftimizer.Simulator;
using Craftimizer.Solver;

namespace Craftimizer.Benchmark;

[SimpleJob]
[SimpleJob(iterationCount: 10)]
[MinColumn, Q1Column, Q3Column, MaxColumn]
[DotTraceDiagnoser]
public class Bench
{
private static SimulationInput[] Inputs { get; } = new SimulationInput[] {
Expand Down
2 changes: 2 additions & 0 deletions Benchmark/Craftimizer.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<Platforms>x64</Platforms>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
Expand All @@ -17,6 +18,7 @@

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.10" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.dotTrace" Version="0.13.10" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.10" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.106">
<PrivateAssets>all</PrivateAssets>
Expand Down

1 comment on commit 334810c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 334810c Previous: a8c3f34 Ratio
Craftimizer.Benchmark.Bench.Solve(State: SimulationState { Input = SimulationInput { Stats = CharacterStats { Craftsmanship = 3290, Control = 3541, CP = 649, Level = 90, CanUseManipulation = True, HasSplendorousBuff = False, IsSpecialist = False, CLvl = 560 }, Recipe = RecipeInfo { IsExpert = False, ClassJobLevel = 90, RLvl = 580, ConditionsFlag = 15, MaxDurability = 70, MaxQuality = 10920, MaxProgress = 3900, QualityModifier = 70, QualityDivider = 115, ProgressModifier = 80, ProgressDivider = 130 }, Random = System.Random, StartingQuality = 0, BaseProgressGain = 204, BaseQualityGain = 240 }, ActionCount = 0, StepCount = 0, Progress = 0, Quality = 0, Durability = 70, CP = 649, Condition = Normal, ActiveEffects = Effects { InnerQuiet = 0, WasteNot = 0, Veneration = 0, GreatStrides = 0, Innovation = 0, FinalAppraisal = 0, WasteNot2 = 0, MuscleMemory = 0, Manipulation = 0, HeartAndSoul = False }, ActionStates = ActionStates { TouchComboIdx = 0, CarefulObservationCount = 0, UsedHeartAndSoul = False, Observed = False }, HQPercent = 1, Collectability = 1, MaxCollectability = 1092, IsFirstStep = True }, Config: SolverConfig { Iterations = 30000, ScoreStorageThreshold = 1, MaxScoreWeightingConstant = 0.1, ExplorationConstant = 4, MaxStepCount = 30, MaxRolloutStepCount = 99, MaxThreadCount = 1, ForkCount = 32, FurcatedActionCount = 16, StrictActions = True, ScoreProgress = 0.2, ScoreQuality = 0.65, ScoreDurability = 0.05, ScoreCP = 0.05, ScoreSteps = 0.05, Algorithm = Stepwise }) 1617743877.7777777 ns (± 5492768.753956828)
Craftimizer.Benchmark.Bench.Solve(State: SimulationState { Input = SimulationInput { Stats = CharacterStats { Craftsmanship = 3304, Control = 3374, CP = 575, Level = 90, CanUseManipulation = True, HasSplendorousBuff = False, IsSpecialist = False, CLvl = 560 }, Recipe = RecipeInfo { IsExpert = False, ClassJobLevel = 90, RLvl = 560, ConditionsFlag = 15, MaxDurability = 80, MaxQuality = 7200, MaxProgress = 3500, QualityModifier = 80, QualityDivider = 115, ProgressModifier = 90, ProgressDivider = 130 }, Random = System.Random, StartingQuality = 0, BaseProgressGain = 230, BaseQualityGain = 262 }, ActionCount = 0, StepCount = 0, Progress = 0, Quality = 0, Durability = 80, CP = 575, Condition = Normal, ActiveEffects = Effects { InnerQuiet = 0, WasteNot = 0, Veneration = 0, GreatStrides = 0, Innovation = 0, FinalAppraisal = 0, WasteNot2 = 0, MuscleMemory = 0, Manipulation = 0, HeartAndSoul = False }, ActionStates = ActionStates { TouchComboIdx = 0, CarefulObservationCount = 0, UsedHeartAndSoul = False, Observed = False }, HQPercent = 1, Collectability = 1, MaxCollectability = 720, IsFirstStep = True }, Config: SolverConfig { Iterations = 30000, ScoreStorageThreshold = 1, MaxScoreWeightingConstant = 0.1, ExplorationConstant = 4, MaxStepCount = 30, MaxRolloutStepCount = 99, MaxThreadCount = 1, ForkCount = 32, FurcatedActionCount = 16, StrictActions = True, ScoreProgress = 0.2, ScoreQuality = 0.65, ScoreDurability = 0.05, ScoreCP = 0.05, ScoreSteps = 0.05, Algorithm = Stepwise }) 1724891100 ns (± 5436250.589725028)

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.