-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use UnitConverter to do conversion functions and allow basic extensib…
…ility (#1023)
- Loading branch information
1 parent
8d2eeb6
commit e5aba5b
Showing
231 changed files
with
16,305 additions
and
15,603 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
Oops, something went wrong.
e5aba5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'UnitsNet Benchmarks (netcoreapp50)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.UnitsNet.Benchmark.UnitsNetBenchmarks.ToProperty
159.2675245780961
ns (± 0.5433470807691423
)8.308972553079963
ns (± 0.30834234285384077
)19.17
UnitsNet.Benchmark.UnitsNetBenchmarks.As
157.67732568478706
ns (± 0.9105617038717335
)8.681671332357332
ns (± 0.3381877246725936
)18.16
UnitsNet.Benchmark.UnitsNetBenchmarks.ToUnit
149.6124216813756
ns (± 0.675176064938718
)15.374941458615002
ns (± 0.5456507337390197
)9.73
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_As
160.9926981226055
ns (± 0.2536573782335105
)19.302405701107926
ns (± 0.5439909019734129
)8.34
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_ToUnit
169.39405896531517
ns (± 0.9097505369040623
)29.74920538182548
ns (± 1.1395401311539952
)5.69
This comment was automatically generated by workflow using github-action-benchmark.
CC: @lipchev
e5aba5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UnitsNet Benchmarks (netcoreapp50)
UnitsNet.Benchmark.UnitsNetBenchmarks.Constructor
9.52822853704421
ns (± 0.025090253899023952
)8.988075464026887
ns (± 0.32620679579334166
)1.06
UnitsNet.Benchmark.UnitsNetBenchmarks.Constructor_SI
322.7295429950886
ns (± 1.029040341661038
)308.24256696406604
ns (± 8.000322244264588
)1.05
UnitsNet.Benchmark.UnitsNetBenchmarks.FromMethod
24.457248058454166
ns (± 0.04644239541111441
)23.210392242530787
ns (± 0.5960096416770105
)1.05
UnitsNet.Benchmark.UnitsNetBenchmarks.ToProperty
159.2675245780961
ns (± 0.5433470807691423
)8.308972553079963
ns (± 0.30834234285384077
)19.17
UnitsNet.Benchmark.UnitsNetBenchmarks.As
157.67732568478706
ns (± 0.9105617038717335
)8.681671332357332
ns (± 0.3381877246725936
)18.16
UnitsNet.Benchmark.UnitsNetBenchmarks.As_SI
327.095648582764
ns (± 1.438014189649949
)310.51527858928165
ns (± 9.103546491198989
)1.05
UnitsNet.Benchmark.UnitsNetBenchmarks.ToUnit
149.6124216813756
ns (± 0.675176064938718
)15.374941458615002
ns (± 0.5456507337390197
)9.73
UnitsNet.Benchmark.UnitsNetBenchmarks.ToUnit_SI
329.6921629877179
ns (± 1.1678354257311108
)313.8778900879904
ns (± 5.689354262475625
)1.05
UnitsNet.Benchmark.UnitsNetBenchmarks.ToStringTest
1312.6490581522623
ns (± 8.723494052786021
)1253.4163810014077
ns (± 25.55352205901862
)1.05
UnitsNet.Benchmark.UnitsNetBenchmarks.Parse
44273.702553275
ns (± 244.5976415021368
)42531.44894483974
ns (± 1199.867832233879
)1.04
UnitsNet.Benchmark.UnitsNetBenchmarks.TryParseValid
44846.12356551908
ns (± 140.2718908630166
)42972.28339932449
ns (± 1231.9308610424093
)1.04
UnitsNet.Benchmark.UnitsNetBenchmarks.TryParseInvalid
48127.831561237304
ns (± 253.220969831624
)45173.97727001977
ns (± 1543.4434116238435
)1.07
UnitsNet.Benchmark.UnitsNetBenchmarks.QuantityFrom
71.71828730824943
ns (± 0.22773300532381832
)3150
ns (± 87.83100656536799
)0.02276771025658712
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_As
160.9926981226055
ns (± 0.2536573782335105
)19.302405701107926
ns (± 0.5439909019734129
)8.34
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_As_SI
325.1316638512627
ns (± 0.9018420067181974
)313.17210281257525
ns (± 8.602007501988172
)1.04
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_ToUnit
169.39405896531517
ns (± 0.9097505369040623
)29.74920538182548
ns (± 1.1395401311539952
)5.69
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_ToStringTest
1334.4304067267803
ns (± 6.965447949048769
)1229.8039179489347
ns (± 38.248967174338155
)1.09
This comment was automatically generated by workflow using github-action-benchmark.
e5aba5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UnitsNet Benchmarks (netcoreapp21)
UnitsNet.Benchmark.UnitsNetBenchmarks.Constructor
11.891646489879545
ns (± 0.41109499940680594
)13.683423722171701
ns (± 0.294628868048763
)0.87
UnitsNet.Benchmark.UnitsNetBenchmarks.Constructor_SI
553.3455271515359
ns (± 11.81895208480539
)662.95355482051
ns (± 13.598736522725414
)0.83
UnitsNet.Benchmark.UnitsNetBenchmarks.FromMethod
30.797189170488156
ns (± 0.61405490746595
)31.53873893205566
ns (± 0.4034917870893946
)0.98
UnitsNet.Benchmark.UnitsNetBenchmarks.ToProperty
215.05686795887917
ns (± 3.625485952406118
)10.94906321178836
ns (± 0.22740646133969988
)19.64
UnitsNet.Benchmark.UnitsNetBenchmarks.As
232.77466766276405
ns (± 4.625326315228878
)10.981953257733903
ns (± 0.3694240572546368
)21.20
UnitsNet.Benchmark.UnitsNetBenchmarks.As_SI
574.7856753369464
ns (± 24.759573995297323
)688.3371468256553
ns (± 17.23176322016595
)0.84
UnitsNet.Benchmark.UnitsNetBenchmarks.ToUnit
208.52813863878535
ns (± 4.746806451908159
)22.012920069270148
ns (± 0.38190370946440494
)9.47
UnitsNet.Benchmark.UnitsNetBenchmarks.ToUnit_SI
575.8790216730469
ns (± 18.584023580195005
)658.5169967841999
ns (± 9.273505941484775
)0.87
UnitsNet.Benchmark.UnitsNetBenchmarks.ToStringTest
2422.3496937701234
ns (± 41.59745043262032
)2605.9156185409474
ns (± 49.042063845974404
)0.93
UnitsNet.Benchmark.UnitsNetBenchmarks.Parse
72062.93513787231
ns (± 1248.9376332715894
)77325.48704069441
ns (± 2239.8972634902984
)0.93
UnitsNet.Benchmark.UnitsNetBenchmarks.TryParseValid
72693.69761366732
ns (± 1313.253707525675
)78333.77678253813
ns (± 2429.447445100901
)0.93
UnitsNet.Benchmark.UnitsNetBenchmarks.TryParseInvalid
79314.5923149016
ns (± 1187.4072217760747
)84855.34032925774
ns (± 1740.1696868597987
)0.93
UnitsNet.Benchmark.UnitsNetBenchmarks.QuantityFrom
110.4504992793666
ns (± 1.3848827853535577
)2691.780821917808
ns (± 133.07623614715308
)0.0410325010045484
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_As
229.65238332842108
ns (± 3.6590406665831186
)24.726702135830823
ns (± 0.5811742873432862
)9.29
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_As_SI
547.0623966489782
ns (± 9.72606688824364
)644.294389419918
ns (± 8.8460166778799
)0.85
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_ToUnit
230.13582809209203
ns (± 6.281576543006521
)35.296309937212804
ns (± 0.6171507982647606
)6.52
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_ToStringTest
2472.8509313465706
ns (± 32.61434720391898
)2654.517314708867
ns (± 30.73583092650037
)0.93
This comment was automatically generated by workflow using github-action-benchmark.
e5aba5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'UnitsNet Benchmarks (netcoreapp21)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.UnitsNet.Benchmark.UnitsNetBenchmarks.ToProperty
215.05686795887917
ns (± 3.625485952406118
)10.94906321178836
ns (± 0.22740646133969988
)19.64
UnitsNet.Benchmark.UnitsNetBenchmarks.As
232.77466766276405
ns (± 4.625326315228878
)10.981953257733903
ns (± 0.3694240572546368
)21.20
UnitsNet.Benchmark.UnitsNetBenchmarks.ToUnit
208.52813863878535
ns (± 4.746806451908159
)22.012920069270148
ns (± 0.38190370946440494
)9.47
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_As
229.65238332842108
ns (± 3.6590406665831186
)24.726702135830823
ns (± 0.5811742873432862
)9.29
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_ToUnit
230.13582809209203
ns (± 6.281576543006521
)35.296309937212804
ns (± 0.6171507982647606
)6.52
This comment was automatically generated by workflow using github-action-benchmark.
CC: @lipchev
e5aba5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'UnitsNet Benchmarks (net472)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.UnitsNet.Benchmark.UnitsNetBenchmarks.ToProperty
293.18471495027876
ns (± 5.4840107027259375
)7.926924497708099
ns (± 0.42045207673733054
)36.99
UnitsNet.Benchmark.UnitsNetBenchmarks.As
298.13086221493074
ns (± 6.8929372322534155
)7.535495820621575
ns (± 0.06423681294476093
)39.56
UnitsNet.Benchmark.UnitsNetBenchmarks.ToUnit
293.85010029805846
ns (± 8.918249864021876
)17.672890278827662
ns (± 0.5384998312434098
)16.63
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_As
306.6060298002434
ns (± 4.5183851268595765
)17.715057952494934
ns (± 0.54330157537113
)17.31
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_ToUnit
315.92363340210903
ns (± 6.765978833259235
)26.38794379846414
ns (± 0.5618953807909987
)11.97
This comment was automatically generated by workflow using github-action-benchmark.
CC: @lipchev
e5aba5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UnitsNet Benchmarks (net472)
UnitsNet.Benchmark.UnitsNetBenchmarks.Constructor
15.5968610293695
ns (± 0.23127685737856338
)11.720710407161912
ns (± 0.5513988197226473
)1.33
UnitsNet.Benchmark.UnitsNetBenchmarks.Constructor_SI
607.9319158469277
ns (± 10.92707218331886
)456.6619523738062
ns (± 11.549141545324357
)1.33
UnitsNet.Benchmark.UnitsNetBenchmarks.FromMethod
36.38055006589663
ns (± 0.6292359385142119
)27.52885628607952
ns (± 1.420088490037617
)1.32
UnitsNet.Benchmark.UnitsNetBenchmarks.ToProperty
293.18471495027876
ns (± 5.4840107027259375
)7.926924497708099
ns (± 0.42045207673733054
)36.99
UnitsNet.Benchmark.UnitsNetBenchmarks.As
298.13086221493074
ns (± 6.8929372322534155
)7.535495820621575
ns (± 0.06423681294476093
)39.56
UnitsNet.Benchmark.UnitsNetBenchmarks.As_SI
618.7046880494022
ns (± 13.275291033196652
)449.92911582958175
ns (± 7.440376694304617
)1.38
UnitsNet.Benchmark.UnitsNetBenchmarks.ToUnit
293.85010029805846
ns (± 8.918249864021876
)17.672890278827662
ns (± 0.5384998312434098
)16.63
UnitsNet.Benchmark.UnitsNetBenchmarks.ToUnit_SI
646.0313680658295
ns (± 12.77688161009029
)487.72823496056986
ns (± 22.926550095050818
)1.32
UnitsNet.Benchmark.UnitsNetBenchmarks.ToStringTest
2422.3483101838833
ns (± 43.716626789513825
)1715.806233747826
ns (± 100.59307463672073
)1.41
UnitsNet.Benchmark.UnitsNetBenchmarks.Parse
68528.95133057226
ns (± 1962.2006260569053
)49033.68578899753
ns (± 1690.8497664708946
)1.40
UnitsNet.Benchmark.UnitsNetBenchmarks.TryParseValid
70240.99106417547
ns (± 1232.7794188732087
)51141.76730117251
ns (± 2405.840013505295
)1.37
UnitsNet.Benchmark.UnitsNetBenchmarks.TryParseInvalid
73492.22384784199
ns (± 932.3317755387818
)55074.923437218524
ns (± 2450.812758537697
)1.33
UnitsNet.Benchmark.UnitsNetBenchmarks.QuantityFrom
122.87521051887278
ns (± 2.050422838502803
)2065.3846153846152
ns (± 83.74708747552651
)0.05949265313762928
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_As
306.6060298002434
ns (± 4.5183851268595765
)17.715057952494934
ns (± 0.54330157537113
)17.31
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_As_SI
613.4936523758766
ns (± 11.503903783395817
)473.45150086638137
ns (± 20.111318913521124
)1.30
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_ToUnit
315.92363340210903
ns (± 6.765978833259235
)26.38794379846414
ns (± 0.5618953807909987
)11.97
UnitsNet.Benchmark.UnitsNetBenchmarks.IQuantity_ToStringTest
2362.03150020315
ns (± 33.07757153105004
)1649.4820182242966
ns (± 44.81373107769935
)1.43
This comment was automatically generated by workflow using github-action-benchmark.