diff --git a/src/benchmarks/micro/libraries/System.Runtime/Perf.DateTime.cs b/src/benchmarks/micro/libraries/System.Runtime/Perf.DateTime.cs index 57c897cb479..df8e0dd0d2e 100644 --- a/src/benchmarks/micro/libraries/System.Runtime/Perf.DateTime.cs +++ b/src/benchmarks/micro/libraries/System.Runtime/Perf.DateTime.cs @@ -13,7 +13,7 @@ public class Perf_DateTime { DateTime date1 = new DateTime(1996, 6, 3, 22, 15, 0); DateTime date2 = new DateTime(1996, 12, 6, 13, 2, 0); - + [Benchmark] public DateTime GetNow() => DateTime.Now; @@ -41,5 +41,17 @@ public static IEnumerable ToString_MemberData() [Benchmark] public DateTime ParseO() => DateTime.ParseExact("1996-06-03T22:15:00.0000000", "o", null); + + [Benchmark] + public int Day() => date1.Day; + + [Benchmark] + public int Month() => date1.Month; + + [Benchmark] + public int Year() => date1.Year; + + [Benchmark] + public int DayOfYear() => date1.DayOfYear; } }