-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add benchmarks for FossilDelta algorithm. #1
- Loading branch information
Showing
8 changed files
with
182 additions
and
22 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
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,69 @@ | ||
using System; | ||
using BenchmarkDotNet.Attributes; | ||
using BenchmarkDotNet.Attributes.Jobs; | ||
using BenchmarkDotNet.Running; | ||
|
||
namespace Benchmarks | ||
{ | ||
public class DeltaCompressionDotNet | ||
{ | ||
byte[] sample1Delta; | ||
byte[] sample2Delta; | ||
byte[] sample3Delta; | ||
byte[] sample4Delta; | ||
|
||
[Benchmark] | ||
public byte[] CreateDelta1() | ||
{ | ||
sample1Delta = Fossil.Delta.Create(Samples.origin1, Samples.target1); | ||
return sample1Delta; | ||
} | ||
|
||
[Benchmark] | ||
public byte[] CreateDelta2() | ||
{ | ||
sample2Delta = Fossil.Delta.Create(Samples.origin2, Samples.target2); | ||
return sample2Delta; | ||
} | ||
|
||
[Benchmark] | ||
public byte[] CreateDelta3() | ||
{ | ||
sample3Delta = Fossil.Delta.Create(Samples.origin3, Samples.target3); | ||
return sample3Delta; | ||
} | ||
|
||
[Benchmark] | ||
public byte[] CreateDelta4() | ||
{ | ||
sample4Delta = Fossil.Delta.Create(Samples.origin4, Samples.target4); | ||
return sample4Delta; | ||
} | ||
|
||
[Benchmark] | ||
public byte[] ApplyDelta1() | ||
{ | ||
return Fossil.Delta.Apply(Samples.origin1, sample1Delta); | ||
} | ||
|
||
[Benchmark] | ||
public byte[] ApplyDelta2() | ||
{ | ||
return Fossil.Delta.Apply(Samples.origin2, sample2Delta); | ||
} | ||
|
||
[Benchmark] | ||
public byte[] ApplyDelta3() | ||
{ | ||
return Fossil.Delta.Apply(Samples.origin3, sample3Delta); | ||
} | ||
|
||
[Benchmark] | ||
public byte[] ApplyDelta4() | ||
{ | ||
return Fossil.Delta.Apply(Samples.origin4, sample4Delta); | ||
} | ||
|
||
} | ||
} | ||
|
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
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