-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
299 changed files
with
13,949 additions
and
2,360 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,12 @@ | ||
# These are supported funding model platforms | ||
|
||
github: # Replace with GitHub username(s) | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: ["paypal.me/melanchall"] |
Large diffs are not rendered by default.
Oops, something went wrong.
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
54 changes: 54 additions & 0 deletions
54
DryWetMidi.Benchmarks/Core/MidiFile/MidiFileReadingHandlerBenchmarks.cs
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,54 @@ | ||
using BenchmarkDotNet.Attributes; | ||
using BenchmarkDotNet.Engines; | ||
using Melanchall.DryWetMidi.Core; | ||
using Melanchall.DryWetMidi.Tests.Common; | ||
using NUnit.Framework; | ||
|
||
namespace Melanchall.DryWetMidi.Benchmarks.Core | ||
{ | ||
[TestFixture] | ||
public sealed class MidiFileReadingHandlerBenchmarks : BenchmarkTest | ||
{ | ||
#region Nested classes | ||
|
||
private sealed class EmptyHandler : ReadingHandler | ||
{ | ||
public EmptyHandler() | ||
: base(TargetScope.Event | TargetScope.File | TargetScope.TrackChunk) | ||
{ | ||
} | ||
} | ||
|
||
[InProcessSimpleJob(RunStrategy.Monitoring, warmupCount: 5, targetCount: 5, launchCount: 5, invocationCount: 5)] | ||
public class Benchmarks_ReadingHandler | ||
{ | ||
[Benchmark] | ||
public void Read_WithoutHandlers() | ||
{ | ||
var midiFile = MidiFile.Read(TestFilesProvider.GetMiscFile_14000events()); | ||
} | ||
|
||
[Benchmark] | ||
public void Read_WithEmptyHandler() | ||
{ | ||
var handler = new EmptyHandler(); | ||
var settings = new ReadingSettings(); | ||
settings.ReadingHandlers.Add(handler); | ||
|
||
var midiFile = MidiFile.Read(TestFilesProvider.GetMiscFile_14000events(), settings); | ||
} | ||
} | ||
|
||
#endregion | ||
|
||
#region Test methods | ||
|
||
[Test] | ||
public void ReadMidiFileUsingHandler() | ||
{ | ||
RunBenchmarks<Benchmarks_ReadingHandler>(); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
Oops, something went wrong.