From eff7202e7dbfdeb1b53195ac1ce5450bed7e0ead Mon Sep 17 00:00:00 2001 From: Fausto David Date: Tue, 31 Dec 2019 15:26:06 +0100 Subject: [PATCH] format code --- .../ListPoolClearBenchmarks.cs | 1 + .../ListPoolContainsBenchmark.cs | 8 +- .../ListPoolCopyToBenchmarks.cs | 8 +- .../ListPoolIndexOfBenchmarks.cs | 6 +- .../ListPoolRemoveAtBenchmarks.cs | 6 +- .../ListPoolRemoveBenchmarks.cs | 6 +- tests/ListPool.UnitTests/EnumeratorTests.cs | 1 + tests/ListPool.UnitTests/ListPoolAsIList.cs | 123 +- tests/ListPool.UnitTests/coverage.json | 1332 +++++++++-------- 9 files changed, 748 insertions(+), 743 deletions(-) diff --git a/perf/ListPool.Benchmarks/ListPoolClearBenchmarks.cs b/perf/ListPool.Benchmarks/ListPoolClearBenchmarks.cs index 699fea1..b3712dc 100644 --- a/perf/ListPool.Benchmarks/ListPoolClearBenchmarks.cs +++ b/perf/ListPool.Benchmarks/ListPoolClearBenchmarks.cs @@ -16,6 +16,7 @@ public class ListPoolClearBenchmarks [Params(1000)] public int N { get; set; } + [Params(0.10, 0.50, 0.80, 1)] public double CapacityFilled { get; set; } diff --git a/perf/ListPool.Benchmarks/ListPoolContainsBenchmark.cs b/perf/ListPool.Benchmarks/ListPoolContainsBenchmark.cs index efb5f2a..7d30bff 100644 --- a/perf/ListPool.Benchmarks/ListPoolContainsBenchmark.cs +++ b/perf/ListPool.Benchmarks/ListPoolContainsBenchmark.cs @@ -11,19 +11,19 @@ namespace ListPool.Benchmarks [GcConcurrent] public class ListPoolContainsBenchmark { - [Params(10, 100, 1000, 10000)] - public int N { get; set; } - private List _list; private ListPool _listPool; + [Params(10, 100, 1000, 10000)] + public int N { get; set; } + [IterationSetup] public void IterationSetup() { _list = new List(N); _listPool = new ListPool(N); - for (int i = 1; i <= N; i++) + for (int i = 1; i <= N; i++) { _list.Add(i); _listPool.Add(i); diff --git a/perf/ListPool.Benchmarks/ListPoolCopyToBenchmarks.cs b/perf/ListPool.Benchmarks/ListPoolCopyToBenchmarks.cs index 4e27be0..402eb35 100644 --- a/perf/ListPool.Benchmarks/ListPoolCopyToBenchmarks.cs +++ b/perf/ListPool.Benchmarks/ListPoolCopyToBenchmarks.cs @@ -11,14 +11,14 @@ namespace ListPool.Benchmarks [GcConcurrent] public class ListPoolCopyToBenchmarks { - [Params(10, 100, 1000, 10000)] - public int N { get; set; } - private List _list; - private ListPool _listPool; private int[] _listCopy; + private ListPool _listPool; private int[] _listPoolCopy; + [Params(10, 100, 1000, 10000)] + public int N { get; set; } + [IterationSetup] public void IterationSetup() { diff --git a/perf/ListPool.Benchmarks/ListPoolIndexOfBenchmarks.cs b/perf/ListPool.Benchmarks/ListPoolIndexOfBenchmarks.cs index cb614d0..435f631 100644 --- a/perf/ListPool.Benchmarks/ListPoolIndexOfBenchmarks.cs +++ b/perf/ListPool.Benchmarks/ListPoolIndexOfBenchmarks.cs @@ -11,12 +11,12 @@ namespace ListPool.Benchmarks [GcConcurrent] public class ListPoolIndexOfBenchmarks { - [Params(10, 100, 1000, 10000)] - public int N { get; set; } - private List _list; private ListPool _listPool; + [Params(10, 100, 1000, 10000)] + public int N { get; set; } + [IterationSetup] public void IterationSetup() { diff --git a/perf/ListPool.Benchmarks/ListPoolRemoveAtBenchmarks.cs b/perf/ListPool.Benchmarks/ListPoolRemoveAtBenchmarks.cs index 6b69e5f..afdc988 100644 --- a/perf/ListPool.Benchmarks/ListPoolRemoveAtBenchmarks.cs +++ b/perf/ListPool.Benchmarks/ListPoolRemoveAtBenchmarks.cs @@ -11,12 +11,12 @@ namespace ListPool.Benchmarks [GcConcurrent] public class ListPoolRemoveAtBenchmarks { - [Params(10, 100, 1000, 10000)] - public int N { get; set; } - private List _list; private ListPool _listPool; + [Params(10, 100, 1000, 10000)] + public int N { get; set; } + [IterationSetup] public void IterationSetup() { diff --git a/perf/ListPool.Benchmarks/ListPoolRemoveBenchmarks.cs b/perf/ListPool.Benchmarks/ListPoolRemoveBenchmarks.cs index 7b3f035..d38edb4 100644 --- a/perf/ListPool.Benchmarks/ListPoolRemoveBenchmarks.cs +++ b/perf/ListPool.Benchmarks/ListPoolRemoveBenchmarks.cs @@ -11,12 +11,12 @@ namespace ListPool.Benchmarks [GcConcurrent] public class ListPoolRemoveBenchmarks { - [Params(10, 100, 1000, 10000)] - public int N { get; set; } - private List _list; private ListPool _listPool; + [Params(10, 100, 1000, 10000)] + public int N { get; set; } + [IterationSetup] public void IterationSetup() { diff --git a/tests/ListPool.UnitTests/EnumeratorTests.cs b/tests/ListPool.UnitTests/EnumeratorTests.cs index dd58178..4d048b2 100644 --- a/tests/ListPool.UnitTests/EnumeratorTests.cs +++ b/tests/ListPool.UnitTests/EnumeratorTests.cs @@ -49,6 +49,7 @@ public void Reset_allows_enumerator_to_be_enumerate_again() Assert.True(sut.MoveNext()); Assert.Equal(expectedEnumerator.Current, sut.Current); } + Assert.False(sut.MoveNext()); sut.Reset(); expectedEnumerator.Reset(); diff --git a/tests/ListPool.UnitTests/ListPoolAsIList.cs b/tests/ListPool.UnitTests/ListPoolAsIList.cs index 51f5a73..4208084 100644 --- a/tests/ListPool.UnitTests/ListPoolAsIList.cs +++ b/tests/ListPool.UnitTests/ListPoolAsIList.cs @@ -33,55 +33,6 @@ public override void Add_items_when_capacity_is_full_then_buffer_autogrow() Assert.True(expectedItems.All(expectedItem => sut.Contains(expectedItem))); } - [Fact] - public void Add_item_when_is_not_same_type_throw_ArgumentException() - { - using var listPool = new ListPool(); - IList sut = listPool; - string itemWithWrongType = s_fixture.Create(); - - ArgumentException actualException = Assert.Throws(() => sut.Add(itemWithWrongType)); - Assert.Equal("item", actualException.ParamName); - } - - [Fact] - public void Insert_item_when_is_not_same_type_throw_ArgumentException() - { - using var listPool = new ListPool(); - IList sut = listPool; - string itemWithWrongType = s_fixture.Create(); - - ArgumentException actualException = Assert.Throws(() => sut.Insert(0, itemWithWrongType)); - Assert.Equal("item", actualException.ParamName); - } - - [Fact] - public void IsFixedSize_always_return_false() - { - using var listPool = new ListPool(); - IList sut = listPool; - - Assert.False(sut.IsFixedSize); - } - - [Fact] - public void IsSynchronized_always_return_false() - { - using var listPool = new ListPool(); - IList sut = listPool; - - Assert.False(sut.IsSynchronized); - } - - [Fact] - public void SyncRoot_never_is_null() - { - using var listPool = new ListPool(); - IList sut = listPool; - - Assert.NotNull(sut.SyncRoot); - } - public override void Contains_empty_ListPool_without_indicating_capacity_returns_false() { int randomItem = s_fixture.Create(); @@ -378,7 +329,7 @@ public override void Remove_when_item_is_null_return_false() using var listPool = new ListPool(); IList sut = listPool; - sut.Remove(item); + sut.Remove(item); } @@ -476,23 +427,33 @@ public override void Set_item_with_index_bellow_zero_throws_ArgumentOutOfRangeEx } [Fact] - public void Set_item_with_another_type_throws_ArgumentException() + public void Add_item_when_is_not_same_type_throw_ArgumentException() { - const int index = 0; + using var listPool = new ListPool(); + IList sut = listPool; string itemWithWrongType = s_fixture.Create(); - var listPool = new ListPool { s_fixture.Create() }; + + ArgumentException actualException = Assert.Throws(() => sut.Add(itemWithWrongType)); + Assert.Equal("item", actualException.ParamName); + } + + [Fact] + public void Contains_item_with_another_type_throws_ArgumentException() + { + string itemWithWrongType = s_fixture.Create(); + var listPool = new ListPool {s_fixture.Create()}; IList sut = listPool; - ArgumentException exception = Assert.Throws(() => sut[index] = itemWithWrongType); + ArgumentException exception = Assert.Throws(() => sut.Contains(itemWithWrongType)); - Assert.Equal("value", exception.ParamName); + Assert.Equal("item", exception.ParamName); } [Fact] public void IndexOf_item_with_another_type_throws_ArgumentException() { string itemWithWrongType = s_fixture.Create(); - var listPool = new ListPool { s_fixture.Create() }; + var listPool = new ListPool {s_fixture.Create()}; IList sut = listPool; ArgumentException exception = Assert.Throws(() => sut.IndexOf(itemWithWrongType)); @@ -501,27 +462,67 @@ public void IndexOf_item_with_another_type_throws_ArgumentException() } [Fact] - public void Contains_item_with_another_type_throws_ArgumentException() + public void Insert_item_when_is_not_same_type_throw_ArgumentException() { + using var listPool = new ListPool(); + IList sut = listPool; string itemWithWrongType = s_fixture.Create(); - var listPool = new ListPool { s_fixture.Create() }; + + ArgumentException actualException = + Assert.Throws(() => sut.Insert(0, itemWithWrongType)); + Assert.Equal("item", actualException.ParamName); + } + + [Fact] + public void IsFixedSize_always_return_false() + { + using var listPool = new ListPool(); IList sut = listPool; - ArgumentException exception = Assert.Throws(() => sut.Contains(itemWithWrongType)); + Assert.False(sut.IsFixedSize); + } - Assert.Equal("item", exception.ParamName); + [Fact] + public void IsSynchronized_always_return_false() + { + using var listPool = new ListPool(); + IList sut = listPool; + + Assert.False(sut.IsSynchronized); } [Fact] public void Remove_item_with_another_type_throws_ArgumentException() { string itemWithWrongType = s_fixture.Create(); - var listPool = new ListPool { s_fixture.Create() }; + var listPool = new ListPool {s_fixture.Create()}; IList sut = listPool; ArgumentException exception = Assert.Throws(() => sut.Remove(itemWithWrongType)); Assert.Equal("item", exception.ParamName); } + + [Fact] + public void Set_item_with_another_type_throws_ArgumentException() + { + const int index = 0; + string itemWithWrongType = s_fixture.Create(); + var listPool = new ListPool {s_fixture.Create()}; + IList sut = listPool; + + ArgumentException exception = Assert.Throws(() => sut[index] = itemWithWrongType); + + Assert.Equal("value", exception.ParamName); + } + + [Fact] + public void SyncRoot_never_is_null() + { + using var listPool = new ListPool(); + IList sut = listPool; + + Assert.NotNull(sut.SyncRoot); + } } } diff --git a/tests/ListPool.UnitTests/coverage.json b/tests/ListPool.UnitTests/coverage.json index 729fe27..d06646e 100644 --- a/tests/ListPool.UnitTests/coverage.json +++ b/tests/ListPool.UnitTests/coverage.json @@ -1,675 +1,677 @@ { - "ListPool.dll": { - "C:\\Users\\fsuarez\\source\\repos\\ListPool\\src\\ListPool\\BufferOwner.cs": { - "ListPool.BufferOwner`1": { - "System.Void ListPool.BufferOwner`1::GrowDoubleSize()": { - "Lines": { - "22": 2, - "23": 2, - "24": 2, - "25": 2, - "27": 2, - "29": 2, - "30": 2, - "31": 2 - }, - "Branches": [] - }, - "System.Void ListPool.BufferOwner`1::Dispose()": { - "Lines": { - "34": 23, - "35": 23, - "36": 23, - "37": 23 - }, - "Branches": [] - }, - "System.Void ListPool.BufferOwner`1::.ctor(System.Int32)": { - "Lines": { - "14": 23, - "15": 23, - "16": 23, - "17": 23, - "18": 23 - }, - "Branches": [] - } - } - }, - "C:\\Users\\fsuarez\\source\\repos\\ListPool\\src\\ListPool\\Enumerator.cs": { - "ListPool.Enumerator`1": { - "TSource& modreq(System.Runtime.InteropServices.InAttribute) ListPool.Enumerator`1::get_Current()": { - "Lines": { - "25": 30 - }, - "Branches": [] - }, - "TSource ListPool.Enumerator`1::System.Collections.Generic.IEnumerator.get_Current()": { - "Lines": { - "29": 8 - }, - "Branches": [] - }, - "System.Object ListPool.Enumerator`1::System.Collections.IEnumerator.get_Current()": { - "Lines": { - "31": 0 - }, - "Branches": [] - }, - "System.Boolean ListPool.Enumerator`1::MoveNext()": { - "Lines": { - "35": 45, - "36": 45, - "37": 45 - }, - "Branches": [] - }, - "System.Void ListPool.Enumerator`1::Reset()": { - "Lines": { - "40": 1, - "41": 1, - "42": 1 - }, - "Branches": [] - }, - "System.Void ListPool.Enumerator`1::Dispose()": { - "Lines": { - "45": 6, - "46": 6 - }, - "Branches": [] - }, - "System.Void ListPool.Enumerator`1::.ctor(TSource[]&,System.Int32&)": { - "Lines": { - "15": 8, - "16": 8, - "17": 8, - "18": 8, - "19": 8 - }, - "Branches": [] - } - } - }, - "C:\\Users\\fsuarez\\source\\repos\\ListPool\\src\\ListPool\\ListPool.cs": { - "ListPool.ListPool`1": { - "System.Int32 ListPool.ListPool`1::get_Capacity()": { - "Lines": { - "14": 2 - }, - "Branches": [ - { - "Line": 14, - "Offset": 11, - "EndOffset": 13, - "Path": 0, - "Ordinal": 0, - "Hits": 0 - }, - { - "Line": 14, - "Offset": 11, - "EndOffset": 16, - "Path": 1, - "Ordinal": 1, - "Hits": 2 - } - ] - }, - "System.Int32 ListPool.ListPool`1::get_Count()": { - "Lines": { - "15": 14 - }, - "Branches": [] - }, - "System.Boolean ListPool.ListPool`1::get_IsReadOnly()": { - "Lines": { - "16": 1 - }, - "Branches": [] - }, - "System.Void ListPool.ListPool`1::Add(TSource)": { - "Lines": { - "52": 305, - "53": 312, - "54": 306, - "56": 305, - "57": 305 - }, - "Branches": [ - { - "Line": 53, - "Offset": 17, - "EndOffset": 19, - "Path": 0, - "Ordinal": 0, - "Hits": 7 - }, - { - "Line": 53, - "Offset": 17, - "EndOffset": 35, - "Path": 1, - "Ordinal": 1, - "Hits": 305 - }, - { - "Line": 54, - "Offset": 61, - "EndOffset": 63, - "Path": 0, - "Ordinal": 2, - "Hits": 1 - }, - { - "Line": 54, - "Offset": 61, - "EndOffset": 75, - "Path": 1, - "Ordinal": 3, - "Hits": 305 - } - ] - }, - "System.Void ListPool.ListPool`1::Clear()": { - "Lines": { - "59": 1 - }, - "Branches": [] - }, - "System.Boolean ListPool.ListPool`1::Contains(TSource)": { - "Lines": { - "60": 539 - }, - "Branches": [] - }, - "System.Int32 ListPool.ListPool`1::IndexOf(TSource)": { - "Lines": { - "62": 545 - }, - "Branches": [ - { - "Line": 62, - "Offset": 11, - "EndOffset": 13, - "Path": 0, - "Ordinal": 0, - "Hits": 2 - }, - { - "Line": 62, - "Offset": 11, - "EndOffset": 16, - "Path": 1, - "Ordinal": 1, - "Hits": 543 + "ListPool.dll": { + "C:\\Users\\fsuarez\\source\\repos\\ListPool\\src\\ListPool\\BufferOwner.cs": { + "ListPool.BufferOwner`1": { + "System.Void ListPool.BufferOwner`1::GrowDoubleSize()": { + "Lines": { + "22": 2, + "23": 2, + "24": 2, + "25": 2, + "27": 2, + "29": 2, + "30": 2, + "31": 2 + }, + "Branches": [] + }, + "System.Void ListPool.BufferOwner`1::Dispose()": { + "Lines": { + "34": 23, + "35": 23, + "36": 23, + "37": 23 + }, + "Branches": [] + }, + "System.Void ListPool.BufferOwner`1::.ctor(System.Int32)": { + "Lines": { + "14": 23, + "15": 23, + "16": 23, + "17": 23, + "18": 23 + }, + "Branches": [] + } } - ] - }, - "System.Void ListPool.ListPool`1::CopyTo(TSource[],System.Int32)": { - "Lines": { - "65": 1 - }, - "Branches": [] }, - "System.Boolean ListPool.ListPool`1::Remove(TSource)": { - "Lines": { - "68": 3, - "69": 4, - "71": 2, - "73": 3, - "75": 1, - "77": 1, - "78": 3 - }, - "Branches": [ - { - "Line": 69, - "Offset": 12, - "EndOffset": 14, - "Path": 0, - "Ordinal": 0, - "Hits": 1 - }, - { - "Line": 69, - "Offset": 12, - "EndOffset": 18, - "Path": 1, - "Ordinal": 1, - "Hits": 2 - }, - { - "Line": 73, - "Offset": 32, - "EndOffset": 34, - "Path": 0, - "Ordinal": 2, - "Hits": 1 - }, - { - "Line": 73, - "Offset": 32, - "EndOffset": 38, - "Path": 1, - "Ordinal": 3, - "Hits": 1 + "C:\\Users\\fsuarez\\source\\repos\\ListPool\\src\\ListPool\\Enumerator.cs": { + "ListPool.Enumerator`1": { + "TSource& modreq(System.Runtime.InteropServices.InAttribute) ListPool.Enumerator`1::get_Current()": { + "Lines": { + "25": 30 + }, + "Branches": [] + }, + "TSource ListPool.Enumerator`1::System.Collections.Generic.IEnumerator.get_Current()": { + "Lines": { + "29": 8 + }, + "Branches": [] + }, + "System.Object ListPool.Enumerator`1::System.Collections.IEnumerator.get_Current()": { + "Lines": { + "31": 0 + }, + "Branches": [] + }, + "System.Boolean ListPool.Enumerator`1::MoveNext()": { + "Lines": { + "35": 45, + "36": 45, + "37": 45 + }, + "Branches": [] + }, + "System.Void ListPool.Enumerator`1::Reset()": { + "Lines": { + "40": 1, + "41": 1, + "42": 1 + }, + "Branches": [] + }, + "System.Void ListPool.Enumerator`1::Dispose()": { + "Lines": { + "45": 6, + "46": 6 + }, + "Branches": [] + }, + "System.Void ListPool.Enumerator`1::.ctor(TSource[]&,System.Int32&)": { + "Lines": { + "15": 8, + "16": 8, + "17": 8, + "18": 8, + "19": 8 + }, + "Branches": [] + } } - ] }, - "System.Void ListPool.ListPool`1::Insert(System.Int32,TSource)": { - "Lines": { - "82": 261, - "83": 263, - "84": 260, - "85": 260, - "86": 259, - "87": 1, - "89": 259, - "90": 259, - "91": 259 - }, - "Branches": [ - { - "Line": 83, - "Offset": 3, - "EndOffset": 5, - "Path": 0, - "Ordinal": 0, - "Hits": 260 - }, - { - "Line": 83, - "Offset": 3, - "EndOffset": 16, - "Path": 1, - "Ordinal": 1, - "Hits": 1 - }, - { - "Line": 83, - "Offset": 19, - "EndOffset": 21, - "Path": 0, - "Ordinal": 2, - "Hits": 2 - }, - { - "Line": 83, - "Offset": 19, - "EndOffset": 32, - "Path": 1, - "Ordinal": 3, - "Hits": 259 - }, - { - "Line": 84, - "Offset": 48, - "EndOffset": 50, - "Path": 0, - "Ordinal": 4, - "Hits": 1 - }, - { - "Line": 84, - "Offset": 48, - "EndOffset": 66, - "Path": 1, - "Ordinal": 5, - "Hits": 259 - }, - { - "Line": 85, - "Offset": 87, - "EndOffset": 89, - "Path": 0, - "Ordinal": 6, - "Hits": 1 - }, - { - "Line": 85, - "Offset": 87, - "EndOffset": 101, - "Path": 1, - "Ordinal": 7, - "Hits": 259 - }, - { - "Line": 86, - "Offset": 112, - "EndOffset": 114, - "Path": 0, - "Ordinal": 8, - "Hits": 1 - }, - { - "Line": 86, - "Offset": 112, - "EndOffset": 154, - "Path": 1, - "Ordinal": 9, - "Hits": 259 + "C:\\Users\\fsuarez\\source\\repos\\ListPool\\src\\ListPool\\ListPool.cs": { + "ListPool.ListPool`1": { + "System.Int32 ListPool.ListPool`1::get_Capacity()": { + "Lines": { + "14": 2 + }, + "Branches": [ + { + "Line": 14, + "Offset": 11, + "EndOffset": 13, + "Path": 0, + "Ordinal": 0, + "Hits": 0 + }, + { + "Line": 14, + "Offset": 11, + "EndOffset": 16, + "Path": 1, + "Ordinal": 1, + "Hits": 2 + } + ] + }, + "System.Int32 ListPool.ListPool`1::get_Count()": { + "Lines": { + "15": 14 + }, + "Branches": [] + }, + "System.Boolean ListPool.ListPool`1::get_IsReadOnly()": { + "Lines": { + "16": 1 + }, + "Branches": [] + }, + "System.Void ListPool.ListPool`1::Add(TSource)": { + "Lines": { + "52": 305, + "53": 312, + "54": 306, + "56": 305, + "57": 305 + }, + "Branches": [ + { + "Line": 53, + "Offset": 17, + "EndOffset": 19, + "Path": 0, + "Ordinal": 0, + "Hits": 7 + }, + { + "Line": 53, + "Offset": 17, + "EndOffset": 35, + "Path": 1, + "Ordinal": 1, + "Hits": 305 + }, + { + "Line": 54, + "Offset": 61, + "EndOffset": 63, + "Path": 0, + "Ordinal": 2, + "Hits": 1 + }, + { + "Line": 54, + "Offset": 61, + "EndOffset": 75, + "Path": 1, + "Ordinal": 3, + "Hits": 305 + } + ] + }, + "System.Void ListPool.ListPool`1::Clear()": { + "Lines": { + "59": 1 + }, + "Branches": [] + }, + "System.Boolean ListPool.ListPool`1::Contains(TSource)": { + "Lines": { + "60": 539 + }, + "Branches": [] + }, + "System.Int32 ListPool.ListPool`1::IndexOf(TSource)": { + "Lines": { + "62": 545 + }, + "Branches": [ + { + "Line": 62, + "Offset": 11, + "EndOffset": 13, + "Path": 0, + "Ordinal": 0, + "Hits": 2 + }, + { + "Line": 62, + "Offset": 11, + "EndOffset": 16, + "Path": 1, + "Ordinal": 1, + "Hits": 543 + } + ] + }, + "System.Void ListPool.ListPool`1::CopyTo(TSource[],System.Int32)": { + "Lines": { + "65": 1 + }, + "Branches": [] + }, + "System.Boolean ListPool.ListPool`1::Remove(TSource)": { + "Lines": { + "68": 3, + "69": 4, + "71": 2, + "73": 3, + "75": 1, + "77": 1, + "78": 3 + }, + "Branches": [ + { + "Line": 69, + "Offset": 12, + "EndOffset": 14, + "Path": 0, + "Ordinal": 0, + "Hits": 1 + }, + { + "Line": 69, + "Offset": 12, + "EndOffset": 18, + "Path": 1, + "Ordinal": 1, + "Hits": 2 + }, + { + "Line": 73, + "Offset": 32, + "EndOffset": 34, + "Path": 0, + "Ordinal": 2, + "Hits": 1 + }, + { + "Line": 73, + "Offset": 32, + "EndOffset": 38, + "Path": 1, + "Ordinal": 3, + "Hits": 1 + } + ] + }, + "System.Void ListPool.ListPool`1::Insert(System.Int32,TSource)": { + "Lines": { + "82": 261, + "83": 263, + "84": 260, + "85": 260, + "86": 259, + "87": 1, + "89": 259, + "90": 259, + "91": 259 + }, + "Branches": [ + { + "Line": 83, + "Offset": 3, + "EndOffset": 5, + "Path": 0, + "Ordinal": 0, + "Hits": 260 + }, + { + "Line": 83, + "Offset": 3, + "EndOffset": 16, + "Path": 1, + "Ordinal": 1, + "Hits": 1 + }, + { + "Line": 83, + "Offset": 19, + "EndOffset": 21, + "Path": 0, + "Ordinal": 2, + "Hits": 2 + }, + { + "Line": 83, + "Offset": 19, + "EndOffset": 32, + "Path": 1, + "Ordinal": 3, + "Hits": 259 + }, + { + "Line": 84, + "Offset": 48, + "EndOffset": 50, + "Path": 0, + "Ordinal": 4, + "Hits": 1 + }, + { + "Line": 84, + "Offset": 48, + "EndOffset": 66, + "Path": 1, + "Ordinal": 5, + "Hits": 259 + }, + { + "Line": 85, + "Offset": 87, + "EndOffset": 89, + "Path": 0, + "Ordinal": 6, + "Hits": 1 + }, + { + "Line": 85, + "Offset": 87, + "EndOffset": 101, + "Path": 1, + "Ordinal": 7, + "Hits": 259 + }, + { + "Line": 86, + "Offset": 112, + "EndOffset": 114, + "Path": 0, + "Ordinal": 8, + "Hits": 1 + }, + { + "Line": 86, + "Offset": 112, + "EndOffset": 154, + "Path": 1, + "Ordinal": 9, + "Hits": 259 + } + ] + }, + "System.Void ListPool.ListPool`1::RemoveAt(System.Int32)": { + "Lines": { + "94": 5, + "95": 8, + "97": 2, + "98": 2, + "99": 2 + }, + "Branches": [ + { + "Line": 95, + "Offset": 3, + "EndOffset": 5, + "Path": 0, + "Ordinal": 0, + "Hits": 4 + }, + { + "Line": 95, + "Offset": 3, + "EndOffset": 19, + "Path": 1, + "Ordinal": 1, + "Hits": 1 + }, + { + "Line": 95, + "Offset": 22, + "EndOffset": 24, + "Path": 0, + "Ordinal": 2, + "Hits": 3 + }, + { + "Line": 95, + "Offset": 22, + "EndOffset": 35, + "Path": 1, + "Ordinal": 3, + "Hits": 2 + } + ] + }, + "TSource ListPool.ListPool`1::get_Item(System.Int32)": { + "Lines": { + "107": 16, + "108": 16, + "109": 2, + "111": 14, + "112": 14 + }, + "Branches": [ + { + "Line": 108, + "Offset": 3, + "EndOffset": 5, + "Path": 0, + "Ordinal": 0, + "Hits": 15 + }, + { + "Line": 108, + "Offset": 19, + "EndOffset": 21, + "Path": 0, + "Ordinal": 2, + "Hits": 15 + }, + { + "Line": 108, + "Offset": 3, + "EndOffset": 35, + "Path": 1, + "Ordinal": 1, + "Hits": 1 + }, + { + "Line": 108, + "Offset": 19, + "EndOffset": 35, + "Path": 1, + "Ordinal": 3, + "Hits": 1 + }, + { + "Line": 108, + "Offset": 38, + "EndOffset": 40, + "Path": 0, + "Ordinal": 4, + "Hits": 2 + }, + { + "Line": 108, + "Offset": 38, + "EndOffset": 51, + "Path": 1, + "Ordinal": 5, + "Hits": 14 + } + ] + }, + "System.Void ListPool.ListPool`1::set_Item(System.Int32,TSource)": { + "Lines": { + "115": 3, + "116": 3, + "117": 2, + "119": 1, + "120": 1 + }, + "Branches": [ + { + "Line": 116, + "Offset": 3, + "EndOffset": 5, + "Path": 0, + "Ordinal": 0, + "Hits": 2 + }, + { + "Line": 116, + "Offset": 19, + "EndOffset": 21, + "Path": 0, + "Ordinal": 2, + "Hits": 2 + }, + { + "Line": 116, + "Offset": 3, + "EndOffset": 35, + "Path": 1, + "Ordinal": 1, + "Hits": 1 + }, + { + "Line": 116, + "Offset": 19, + "EndOffset": 35, + "Path": 1, + "Ordinal": 3, + "Hits": 1 + }, + { + "Line": 116, + "Offset": 38, + "EndOffset": 40, + "Path": 0, + "Ordinal": 4, + "Hits": 2 + }, + { + "Line": 116, + "Offset": 38, + "EndOffset": 51, + "Path": 1, + "Ordinal": 5, + "Hits": 1 + } + ] + }, + "ListPool.Enumerator`1 ListPool.ListPool`1::GetEnumerator()": { + "Lines": { + "126": 6 + }, + "Branches": [] + }, + "System.Collections.Generic.IEnumerator`1 ListPool.ListPool`1::System.Collections.Generic.IEnumerable.GetEnumerator()": + { + "Lines": { + "128": 4 + }, + "Branches": [] + }, + "System.Collections.IEnumerator ListPool.ListPool`1::System.Collections.IEnumerable.GetEnumerator()": { + "Lines": { + "130": 1 + }, + "Branches": [] + }, + "System.Void ListPool.ListPool`1::Dispose()": { + "Lines": { + "133": 31, + "134": 31, + "135": 31, + "136": 23, + "137": 31 + }, + "Branches": [ + { + "Line": 135, + "Offset": 21, + "EndOffset": 23, + "Path": 0, + "Ordinal": 0, + "Hits": 23 + }, + { + "Line": 135, + "Offset": 21, + "EndOffset": 35, + "Path": 1, + "Ordinal": 1, + "Hits": 31 + } + ] + }, + "System.Void ListPool.ListPool`1::.ctor(System.Int32)": { + "Lines": { + "23": 12, + "24": 12, + "25": 12, + "26": 12 + }, + "Branches": [ + { + "Line": 24, + "Offset": 8, + "EndOffset": 10, + "Path": 0, + "Ordinal": 0, + "Hits": 2 + }, + { + "Line": 24, + "Offset": 8, + "EndOffset": 13, + "Path": 1, + "Ordinal": 1, + "Hits": 10 + } + ] + }, + "System.Void ListPool.ListPool`1::.ctor(System.Collections.Generic.IEnumerable`1)": { + "Lines": { + "29": 3, + "30": 3, + "31": 2, + "32": 2, + "33": 2, + "35": 2, + "36": 2, + "38": 1, + "39": 1, + "40": 1, + "42": 1, + "43": 11, + "44": 10, + "45": 10, + "46": 10, + "47": 1, + "48": 3 + }, + "Branches": [ + { + "Line": 30, + "Offset": 14, + "EndOffset": 16, + "Path": 0, + "Ordinal": 0, + "Hits": 2 + }, + { + "Line": 30, + "Offset": 14, + "EndOffset": 68, + "Path": 1, + "Ordinal": 1, + "Hits": 1 + }, + { + "Line": 43, + "Offset": 124, + "EndOffset": 101, + "Path": 1, + "Ordinal": 3, + "Hits": 10 + }, + { + "Line": 43, + "Offset": 124, + "EndOffset": 126, + "Path": 0, + "Ordinal": 2, + "Hits": 1 + } + ] + } } - ] - }, - "System.Void ListPool.ListPool`1::RemoveAt(System.Int32)": { - "Lines": { - "94": 5, - "95": 8, - "97": 2, - "98": 2, - "99": 2 - }, - "Branches": [ - { - "Line": 95, - "Offset": 3, - "EndOffset": 5, - "Path": 0, - "Ordinal": 0, - "Hits": 4 - }, - { - "Line": 95, - "Offset": 3, - "EndOffset": 19, - "Path": 1, - "Ordinal": 1, - "Hits": 1 - }, - { - "Line": 95, - "Offset": 22, - "EndOffset": 24, - "Path": 0, - "Ordinal": 2, - "Hits": 3 - }, - { - "Line": 95, - "Offset": 22, - "EndOffset": 35, - "Path": 1, - "Ordinal": 3, - "Hits": 2 - } - ] - }, - "TSource ListPool.ListPool`1::get_Item(System.Int32)": { - "Lines": { - "107": 16, - "108": 16, - "109": 2, - "111": 14, - "112": 14 - }, - "Branches": [ - { - "Line": 108, - "Offset": 3, - "EndOffset": 5, - "Path": 0, - "Ordinal": 0, - "Hits": 15 - }, - { - "Line": 108, - "Offset": 19, - "EndOffset": 21, - "Path": 0, - "Ordinal": 2, - "Hits": 15 - }, - { - "Line": 108, - "Offset": 3, - "EndOffset": 35, - "Path": 1, - "Ordinal": 1, - "Hits": 1 - }, - { - "Line": 108, - "Offset": 19, - "EndOffset": 35, - "Path": 1, - "Ordinal": 3, - "Hits": 1 - }, - { - "Line": 108, - "Offset": 38, - "EndOffset": 40, - "Path": 0, - "Ordinal": 4, - "Hits": 2 - }, - { - "Line": 108, - "Offset": 38, - "EndOffset": 51, - "Path": 1, - "Ordinal": 5, - "Hits": 14 - } - ] - }, - "System.Void ListPool.ListPool`1::set_Item(System.Int32,TSource)": { - "Lines": { - "115": 3, - "116": 3, - "117": 2, - "119": 1, - "120": 1 - }, - "Branches": [ - { - "Line": 116, - "Offset": 3, - "EndOffset": 5, - "Path": 0, - "Ordinal": 0, - "Hits": 2 - }, - { - "Line": 116, - "Offset": 19, - "EndOffset": 21, - "Path": 0, - "Ordinal": 2, - "Hits": 2 - }, - { - "Line": 116, - "Offset": 3, - "EndOffset": 35, - "Path": 1, - "Ordinal": 1, - "Hits": 1 - }, - { - "Line": 116, - "Offset": 19, - "EndOffset": 35, - "Path": 1, - "Ordinal": 3, - "Hits": 1 - }, - { - "Line": 116, - "Offset": 38, - "EndOffset": 40, - "Path": 0, - "Ordinal": 4, - "Hits": 2 - }, - { - "Line": 116, - "Offset": 38, - "EndOffset": 51, - "Path": 1, - "Ordinal": 5, - "Hits": 1 - } - ] - }, - "ListPool.Enumerator`1 ListPool.ListPool`1::GetEnumerator()": { - "Lines": { - "126": 6 - }, - "Branches": [] }, - "System.Collections.Generic.IEnumerator`1 ListPool.ListPool`1::System.Collections.Generic.IEnumerable.GetEnumerator()": { - "Lines": { - "128": 4 - }, - "Branches": [] - }, - "System.Collections.IEnumerator ListPool.ListPool`1::System.Collections.IEnumerable.GetEnumerator()": { - "Lines": { - "130": 1 - }, - "Branches": [] - }, - "System.Void ListPool.ListPool`1::Dispose()": { - "Lines": { - "133": 31, - "134": 31, - "135": 31, - "136": 23, - "137": 31 - }, - "Branches": [ - { - "Line": 135, - "Offset": 21, - "EndOffset": 23, - "Path": 0, - "Ordinal": 0, - "Hits": 23 - }, - { - "Line": 135, - "Offset": 21, - "EndOffset": 35, - "Path": 1, - "Ordinal": 1, - "Hits": 31 - } - ] - }, - "System.Void ListPool.ListPool`1::.ctor(System.Int32)": { - "Lines": { - "23": 12, - "24": 12, - "25": 12, - "26": 12 - }, - "Branches": [ - { - "Line": 24, - "Offset": 8, - "EndOffset": 10, - "Path": 0, - "Ordinal": 0, - "Hits": 2 - }, - { - "Line": 24, - "Offset": 8, - "EndOffset": 13, - "Path": 1, - "Ordinal": 1, - "Hits": 10 - } - ] - }, - "System.Void ListPool.ListPool`1::.ctor(System.Collections.Generic.IEnumerable`1)": { - "Lines": { - "29": 3, - "30": 3, - "31": 2, - "32": 2, - "33": 2, - "35": 2, - "36": 2, - "38": 1, - "39": 1, - "40": 1, - "42": 1, - "43": 11, - "44": 10, - "45": 10, - "46": 10, - "47": 1, - "48": 3 - }, - "Branches": [ - { - "Line": 30, - "Offset": 14, - "EndOffset": 16, - "Path": 0, - "Ordinal": 0, - "Hits": 2 - }, - { - "Line": 30, - "Offset": 14, - "EndOffset": 68, - "Path": 1, - "Ordinal": 1, - "Hits": 1 - }, - { - "Line": 43, - "Offset": 124, - "EndOffset": 101, - "Path": 1, - "Ordinal": 3, - "Hits": 10 - }, - { - "Line": 43, - "Offset": 124, - "EndOffset": 126, - "Path": 0, - "Ordinal": 2, - "Hits": 1 - } - ] - } - } - }, - "C:\\Users\\fsuarez\\source\\repos\\ListPool\\src\\ListPool\\ListPoolExtensions.cs": { - "ListPool.ListPoolExtensions": { - "ListPool.ListPool`1 ListPool.ListPoolExtensions::ToListPool(System.Collections.Generic.IEnumerable`1)": { - "Lines": { - "9": 4, - "10": 5, - "11": 3, - "12": 3 - }, - "Branches": [ - { - "Line": 10, - "Offset": 7, - "EndOffset": 9, - "Path": 0, - "Ordinal": 0, - "Hits": 1 - }, - { - "Line": 10, - "Offset": 7, - "EndOffset": 20, - "Path": 1, - "Ordinal": 1, - "Hits": 3 + "C:\\Users\\fsuarez\\source\\repos\\ListPool\\src\\ListPool\\ListPoolExtensions.cs": { + "ListPool.ListPoolExtensions": { + "ListPool.ListPool`1 ListPool.ListPoolExtensions::ToListPool(System.Collections.Generic.IEnumerable`1)": + { + "Lines": { + "9": 4, + "10": 5, + "11": 3, + "12": 3 + }, + "Branches": [ + { + "Line": 10, + "Offset": 7, + "EndOffset": 9, + "Path": 0, + "Ordinal": 0, + "Hits": 1 + }, + { + "Line": 10, + "Offset": 7, + "EndOffset": 20, + "Path": 1, + "Ordinal": 1, + "Hits": 3 + } + ] + } } - ] } - } } - } -} \ No newline at end of file +}