ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
rrulebench.php
Go to the documentation of this file.
1 <?php
2 
3 include __DIR__ . '/../vendor/autoload.php';
4 
5 if ($argc < 4) {
6  echo "sabre/vobject ", Sabre\VObject\Version::VERSION, " RRULE benchmark\n";
7  echo "\n";
8  echo "This script can be used to measure the speed of the 'recurrence expansion'\n";
9  echo "system.";
10  echo "\n";
11  echo "Usage: " . $argv[0] . " inputfile.ics startdate enddate\n";
12  die();
13 }
14 
15 list(, $inputFile, $startDate, $endDate) = $argv;
16 
17 $bench = new Hoa\Bench\Bench();
18 $bench->parse->start();
19 
20 echo "Parsing.\n";
22 
23 $bench->parse->stop();
24 
25 echo "Expanding.\n";
26 $bench->expand->start();
27 
28 $vobj->expand(new DateTime($startDate), new DateTime($endDate));
29 
30 $bench->expand->stop();
31 
32 echo $bench,"\n";
global $argv
Definition: svg-scanner.php:41
const VERSION
Full version number.
Definition: Version.php:17
$bench
Definition: rrulebench.php:17
$vobj
Definition: rrulebench.php:21
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42