Skip to content

Commit

Permalink
Set options for some indicators in benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
hmG3 committed Mar 12, 2024
1 parent 4e13263 commit cd4723b
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 69 deletions.
16 changes: 4 additions & 12 deletions src/TaTooIne.Benchmark/BenchmarkOrderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ private BenchmarkOrderer()
ImmutableArray<BenchmarkCase> benchmarkCases,
IEnumerable<BenchmarkLogicalGroupRule>? _)
{
return benchmarkCases
.OrderBy(b => b.Parameters["order"])
.ThenBy(b => b.Descriptor.WorkloadMethodDisplayInfo);
return benchmarkCases.OrderBy(b => b.Parameters["order"]).ThenBy(b => b.Descriptor.WorkloadMethodDisplayInfo);
}

public IEnumerable<BenchmarkCase> GetSummaryOrder(
Expand All @@ -41,15 +39,9 @@ private BenchmarkOrderer()
}
}

public string GetHighlightGroupKey(BenchmarkCase benchmarkCase)
{
return GetGroupKey(benchmarkCase);
}
public string GetHighlightGroupKey(BenchmarkCase benchmarkCase) => GetGroupKey(benchmarkCase);

public string GetLogicalGroupKey(ImmutableArray<BenchmarkCase> _, BenchmarkCase benchmarkCase)
{
return GetGroupKey(benchmarkCase);
}
public string GetLogicalGroupKey(ImmutableArray<BenchmarkCase> _, BenchmarkCase benchmarkCase) => GetGroupKey(benchmarkCase);

public IEnumerable<IGrouping<string, BenchmarkCase>> GetLogicalGroupOrder(
IEnumerable<IGrouping<string, BenchmarkCase>> logicalGroups,
Expand All @@ -73,7 +65,7 @@ private static string GetGroupKey(BenchmarkCase benchmarkCase)
{
indicatorParamValue = indicatorParamValue switch
{
"Cmo" => "CmoXXX", // TALib uses EMA, Tulip uses SMA
"Cmo" => "XXX", // TALib uses EMA, Tulip uses SMA
"LinearReg" => "LinReg",
"LinearRegIntercept" => "LinRegIntercept",
"LinearRegSlope" => "LinRegSlope",
Expand Down
Loading

0 comments on commit cd4723b

Please sign in to comment.