Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/framework and nuget package stuff #42

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

kenny-sellers
Copy link
Collaborator

Fixes: #36
Fixes: #30
Fixes: #29
Fixes: #26

Description

Changing the consuming applications to use an local NuGet package at build time rather than project references or an actual NuGet packages. Adjusting all projects to be multi-targeted (.NET 4.8, .NET 5.0, and .NET 6.0). Adjusting build process to place native binaries in a runtime directory. Added code to load the images correctly.

Improved the build process to be one build for PRs and Main builds. Added benchmarking for all targeted frameworks.

Merge Checklist

  • Added unit or integration tests (if not explain)
  • Benchmarks are equivalent or faster

kenny-sellers and others added 26 commits January 24, 2022 12:01
…e nuget package rather than project references.
Fixing formatting of file
Fixing formatting issues.
Correcting TargetFramework
Correcting Framework issues
Fixing formatting
Correcting to include the conditional for framework
Adding conditional logic for framework
Adding conditional logic for framework
Adding framework conditional
Adding conditional logic for framework
@github-actions
Copy link

Benchmark Comparison - .NET Framework 4.8

Benchmarking comparison between this Pull Request and the comitted values at benchmarks/results

dcraw

 summary:
better: 1, geomean: 1.132
total diff: 1

No Slower results for the provided threshold = 10% and noise filter = 0.3ns.

| Faster                                                          | base/diff | Base Median (ns) | Diff Median (ns) | Modality|
| --------------------------------------------------------------- | ---------:| ----------------:| ----------------:| --------:|
| FileOnQ.Imaging.Raw.Benchmarking.DcrawProcess.ProcessIntoBitmap |      1.13 |   12679593700.00 |   11205866100.00 |         |

No file given
 

dcraw-whitebalance

 summary:
worse: 3, geomean: 1.175
total diff: 3

| Slower                                                                       | diff/base | Base Median (ns) | Diff Median (ns) | Modality|
| ---------------------------------------------------------------------------- | ---------:| ----------------:| ----------------:| --------:|
| FileOnQ.Imaging.Raw.Benchmarking.DcrawProcessWhiteBalance.ProcessIntoBitmap  |      1.20 |   10867874500.00 |   13067031400.00 |         |
| FileOnQ.Imaging.Raw.Benchmarking.DcrawProcessWhiteBalance.ProccessAndWrite   |      1.18 |   10912099500.00 |   12869572300.00 |         |
| FileOnQ.Imaging.Raw.Benchmarking.DcrawProcessWhiteBalance.ProccessIntoMemory |      1.14 |   10864863600.00 |   12434089100.00 |         |

No Faster results for the provided threshold = 10% and noise filter = 0.3ns.

No file given
 

thumbnail

 No differences found between the benchmark results with threshold 10%.
 

Benchmark Results - .NET Framework 4.8

dcraw

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.17763.2458 (1809/October2018Update/Redstone5), VM=Hyper-V
Intel Xeon Platinum 8272CL CPU 2.60GHz, 1 CPU, 2 logical and 2 physical cores
 [Host]     : .NET Framework 4.8 (4.8.4420.0), X64 RyuJIT
 Job-GHSIOX : .NET Framework 4.8 (4.8.4420.0), X64 RyuJIT

Runtime=.NET Framework 4.8  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Allocated native memory Native memory leak Gen 0 Gen 1 Gen 2 Allocated
ProccessAndWrite 11.14 s 0.017 s 0.016 s 830,257,503 B - - - - -
ProccessIntoMemory 10.87 s 0.016 s 0.014 s 830,226,694 B - - - - 153,482,264 B
ProcessIntoBitmap 11.21 s 0.018 s 0.016 s 830,228,638 B - 1000.0000 1000.0000 1000.0000 306,957,376 B

dcraw white balance

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.17763.2458 (1809/October2018Update/Redstone5), VM=Hyper-V
Intel Xeon CPU E5-2673 v3 2.40GHz, 1 CPU, 2 logical and 2 physical cores
 [Host]     : .NET Framework 4.8 (4.8.4420.0), X64 RyuJIT
 Job-GHSIOX : .NET Framework 4.8 (4.8.4420.0), X64 RyuJIT

Runtime=.NET Framework 4.8  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Allocated native memory Native memory leak Gen 0 Gen 1 Gen 2 Allocated
ProccessAndWrite 12.86 s 0.129 s 0.121 s 830,257,503 B - - - - -
ProccessIntoMemory 12.41 s 0.151 s 0.141 s 830,226,694 B - - - - 153,482,264 B
ProcessIntoBitmap 13.06 s 0.258 s 0.335 s 830,228,638 B - 1000.0000 1000.0000 1000.0000 306,957,376 B

thumbnail

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.17763.2458 (1809/October2018Update/Redstone5), VM=Hyper-V
Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 2 logical and 2 physical cores
 [Host]     : .NET Framework 4.8 (4.8.4420.0), X64 RyuJIT
 Job-GHSIOX : .NET Framework 4.8 (4.8.4420.0), X64 RyuJIT

Runtime=.NET Framework 4.8  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Median Allocated native memory Native memory leak Gen 0 Gen 1 Gen 2 Allocated
ThumbnailAndWrite 11.245 ms 0.1212 ms 0.1075 ms 11.246 ms 12,601,608 B - - - - -
ThumbnailIntoMemory 8.451 ms 0.1678 ms 0.4816 ms 8.691 ms 12,597,040 B - - - - 5,691,416 B
ThumbnailIntoBitmap 274.266 ms 0.3991 ms 0.3734 ms 274.286 ms 12,818,670 B 216 B 1000.0000 1000.0000 1000.0000 17,117,760 B

Benchmark Comparison - .NET 5

Benchmarking comparison between this Pull Request and the comitted values at benchmarks/results

dcraw

 summary:
better: 3, geomean: 1.245
total diff: 3

No Slower results for the provided threshold = 10% and noise filter = 0.3ns.

| Faster                                                           | base/diff | Base Median (ns) | Diff Median (ns) | Modality|
| ---------------------------------------------------------------- | ---------:| ----------------:| ----------------:| --------:|
| FileOnQ.Imaging.Raw.Benchmarking.DcrawProcess.ProccessIntoMemory |      1.25 |   13485240850.00 |   10816475550.00 |         |
| FileOnQ.Imaging.Raw.Benchmarking.DcrawProcess.ProcessIntoBitmap  |      1.25 |   13912648400.00 |   11170116600.00 |         |
| FileOnQ.Imaging.Raw.Benchmarking.DcrawProcess.ProccessAndWrite   |      1.24 |   13826707400.00 |   11116406400.00 |         |

No file given
 

dcraw-whitebalance

 No differences found between the benchmark results with threshold 10%.
 

thumbnail

 No differences found between the benchmark results with threshold 10%.
 

Benchmark Results - .NET 5

dcraw

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.17763.2458 (1809/October2018Update/Redstone5)
Intel Xeon Platinum 8272CL CPU 2.60GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK=6.0.101
 [Host]     : .NET 5.0.8 (5.0.821.31504), X64 RyuJIT
 Job-AXZZSH : .NET 5.0.8 (5.0.821.31504), X64 RyuJIT

Runtime=.NET 5.0  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Allocated native memory Native memory leak Gen 0 Gen 1 Gen 2 Allocated
ProccessAndWrite 11.12 s 0.011 s 0.010 s 810,799 KB 0 KB - - - 2 KB
ProccessIntoMemory 10.82 s 0.007 s 0.007 s 810,769 KB - - - - 149,879 KB
ProcessIntoBitmap 11.18 s 0.016 s 0.015 s 810,770 KB - 1000.0000 1000.0000 1000.0000 299,756 KB

dcraw white balance

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.17763.2458 (1809/October2018Update/Redstone5)
Intel Xeon CPU E5-2673 v4 2.30GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK=6.0.101
 [Host]     : .NET 5.0.8 (5.0.821.31504), X64 RyuJIT
 Job-TGELAS : .NET 5.0.8 (5.0.821.31504), X64 RyuJIT

Runtime=.NET 5.0  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Allocated native memory Native memory leak Gen 0 Gen 1 Gen 2 Allocated
ProccessAndWrite 10.74 s 0.089 s 0.084 s 810,799 KB - - - - 2 KB
ProccessIntoMemory 10.38 s 0.082 s 0.072 s 810,769 KB 0 KB - - - 149,879 KB
ProcessIntoBitmap 10.84 s 0.191 s 0.178 s 810,771 KB 0 KB 1000.0000 1000.0000 1000.0000 299,756 KB

thumbnail

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.17763.2458 (1809/October2018Update/Redstone5)
Intel Xeon CPU E5-2673 v4 2.30GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK=6.0.101
 [Host]     : .NET 5.0.8 (5.0.821.31504), X64 RyuJIT
 Job-BJNJDA : .NET 5.0.8 (5.0.821.31504), X64 RyuJIT

Runtime=.NET 5.0  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Allocated native memory Native memory leak Gen 0 Gen 1 Gen 2 Allocated
ThumbnailAndWrite 12.615 ms 0.3638 ms 1.0497 ms 12,602,272 B - - - - 624 B
ThumbnailIntoMemory 9.918 ms 0.2317 ms 0.6572 ms 12,597,362 B - - - - 5,683,936 B
ThumbnailIntoBitmap 285.987 ms 5.6603 ms 8.2969 ms 12,818,936 B 160 B 1000.0000 1000.0000 1000.0000 11,367,352 B

Benchmark Comparison - .NET 6

Benchmarking comparison between this Pull Request and the comitted values at benchmarks/results

dcraw

 No differences found between the benchmark results with threshold 10%.
 

dcraw-whitebalance

 summary:
worse: 3, geomean: 1.161
total diff: 3

| Slower                                                                       | diff/base | Base Median (ns) | Diff Median (ns) | Modality|
| ---------------------------------------------------------------------------- | ---------:| ----------------:| ----------------:| --------:|
| FileOnQ.Imaging.Raw.Benchmarking.DcrawProcessWhiteBalance.ProcessIntoBitmap  |      1.17 |   11125554700.00 |   13056178600.00 |         |
| FileOnQ.Imaging.Raw.Benchmarking.DcrawProcessWhiteBalance.ProccessIntoMemory |      1.16 |   10869754950.00 |   12556246800.00 |         |
| FileOnQ.Imaging.Raw.Benchmarking.DcrawProcessWhiteBalance.ProccessAndWrite   |      1.15 |   11119931100.00 |   12821683900.00 |         |

No Faster results for the provided threshold = 10% and noise filter = 0.3ns.

No file given
 

thumbnail

 summary:
worse: 3, geomean: 1.240
total diff: 3

| Slower                                                         | diff/base | Base Median (ns) | Diff Median (ns) | Modality|
| -------------------------------------------------------------- | ---------:| ----------------:| ----------------:| -------- |
| FileOnQ.Imaging.Raw.Benchmarking.Thumbnail.ThumbnailAndWrite   |      1.30 |      10572100.00 |      13791650.00 |         |
| FileOnQ.Imaging.Raw.Benchmarking.Thumbnail.ThumbnailIntoMemory |      1.24 |       9148450.00 |      11354500.00 | bimodal |
| FileOnQ.Imaging.Raw.Benchmarking.Thumbnail.ThumbnailIntoBitmap |      1.18 |     279418400.00 |     329343300.00 |         |

No Faster results for the provided threshold = 10% and noise filter = 0.3ns.

No file given
 

Benchmark Results - .NET 6

dcraw

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.17763.2458 (1809/October2018Update/Redstone5)
Intel Xeon CPU E5-2673 v3 2.40GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK=6.0.101
 [Host]     : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT
 Job-KRKVVZ : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT

Runtime=.NET 6.0  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Allocated native memory Native memory leak Gen 0 Gen 1 Gen 2 Allocated
ProccessAndWrite 13.21 s 0.048 s 0.044 s 810,799 KB - - - - 2 KB
ProccessIntoMemory 12.88 s 0.059 s 0.056 s 810,769 KB - - - - 149,887 KB
ProcessIntoBitmap 13.31 s 0.048 s 0.043 s 810,774 KB 3 KB 1000.0000 1000.0000 1000.0000 299,764 KB

dcraw white balance

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.17763.2458 (1809/October2018Update/Redstone5)
Intel Xeon CPU E5-2673 v3 2.40GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK=6.0.101
 [Host]     : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT
 Job-BSGGGE : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT

Runtime=.NET 6.0  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Allocated native memory Native memory leak Gen 0 Gen 1 Gen 2 Allocated
ProccessAndWrite 12.83 s 0.083 s 0.077 s 810,799 KB - - - - 13 KB
ProccessIntoMemory 12.59 s 0.135 s 0.120 s 810,769 KB - - - - 149,887 KB
ProcessIntoBitmap 13.03 s 0.190 s 0.178 s 810,774 KB 3 KB 1000.0000 1000.0000 1000.0000 299,764 KB

thumbnail

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.17763.2458 (1809/October2018Update/Redstone5)
Intel Xeon CPU E5-2673 v4 2.30GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK=6.0.101
 [Host]     : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT
 Job-UJGXTF : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT

Runtime=.NET 6.0  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Allocated native memory Native memory leak Gen 0 Gen 1 Gen 2 Allocated
ThumbnailAndWrite 13.83 ms 0.325 ms 0.937 ms 12,307 KB - - - - 1 KB
ThumbnailIntoMemory 11.47 ms 0.255 ms 0.732 ms 12,302 KB - - - - 5,551 KB
ThumbnailIntoBitmap 330.17 ms 6.540 ms 8.032 ms 12,519 KB 0 KB 1000.0000 1000.0000 1000.0000 11,116 KB

Copy link
Contributor

@SkyeHoefling SkyeHoefling left a comment

Choose a reason for hiding this comment

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

@kenny-sellers thanks for the contribution! There are conflicts with the latest changes in main can you resolve those and let me know. I'll do a formal review then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants