Skip to content

Instantly share code, notes, and snippets.

@nordfjord
Created August 10, 2022 15:14
Show Gist options
  • Save nordfjord/1dd7fb7e0b8e977b59f1204b7677ecd0 to your computer and use it in GitHub Desktop.
Save nordfjord/1dd7fb7e0b8e977b59f1204b7677ecd0 to your computer and use it in GitHub Desktop.
RRule perf test
#r "nuget: Ical.Net"
open System
open Ical.Net
let rrule =
"BEGIN:VCALENDAR
BEGIN:VEVENT
DTSTART;TZID=Europe/London:20220811T090000
DTEND;TZID=Europe/London:20220811T093000
RRULE:FREQ=DAILY;INTERVAL=1
END:VEVENT
END:VCALENDAR"
let now = DateTime.Now
let event = Calendar.Load(rrule)
let sw = System.Diagnostics.Stopwatch.StartNew()
for i in seq { 1 .. 365 } do
event.GetOccurrences(DateTime.Now.AddDays(i))
|> ignore
sw.Stop()
printfn "%A" sw.Elapsed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment