< Summary - ReFlex - Library

Information
Class: PointCloud.Benchmark.Benchmarks.UpdatePointCloud.UpdateMethods
Assembly: ReFlex.PointCloud.Benchmark
File(s): D:\a\reflex\reflex\test\Library\Performance\PointCloud.Benchmark\Benchmarks\UpdatePointCloud\UpdateMethods.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 26
Coverable lines: 26
Total lines: 63
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
Update()100%210%
UpdateSpan()100%210%
UpdateSpan2()100%210%
UpdateMemory()100%210%
UpdateMemoryParallel()100%210%
UpdateParallel()100%210%

File(s)

D:\a\reflex\reflex\test\Library\Performance\PointCloud.Benchmark\Benchmarks\UpdatePointCloud\UpdateMethods.cs

#LineLine coverage
 1using BenchmarkDotNet.Attributes;
 2using PointCloud.Benchmark.Util;
 3using ReFlex.Core.Common.Components;
 4
 5namespace PointCloud.Benchmark.Benchmarks.UpdatePointCloud;
 6
 7[MemoryDiagnoser]
 8public class UpdateMethods
 9{
 10    private int _width;
 11    private int _height;
 12
 13    private readonly Common.PointCloud3 _pCloud3;
 14
 15    private Point3[] _data;
 16
 017    public UpdateMethods()
 018    {
 019        var data = DataLoader.Load();
 020        _width = data.Item1;
 021        _height = data.Item2;
 22
 23
 024        _pCloud3 = new Common.PointCloud3(_width, _height);
 025        _data = data.Item3;
 026    }
 27
 28    [Benchmark]
 29    public void Update()
 030    {
 031        _pCloud3.Update(_data);
 032    }
 33
 34    [Benchmark]
 35    public void UpdateSpan()
 036    {
 037        _pCloud3.Update(_data.AsSpan());
 038    }
 39
 40    [Benchmark]
 41    public void UpdateSpan2()
 042    {
 043        _pCloud3.Update2(_data.AsSpan());
 044    }
 45
 46    [Benchmark]
 47    public void UpdateMemory()
 048    {
 049        _pCloud3.Update(_data.AsMemory());
 050    }
 51
 52    [Benchmark]
 53    public void UpdateMemoryParallel()
 054    {
 055        _pCloud3.UpdateParallel(_data.AsMemory());
 056    }
 57
 58    [Benchmark]
 59    public void UpdateParallel()
 060    {
 061        _pCloud3.UpdateParallel(_data);
 062    }
 63}