ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
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"
;
21
$vobj
=
Sabre\VObject\Reader::read
(
fopen
($inputFile,
'r'
));
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"
;
DateTime
$argv
global $argv
Definition:
svg-scanner.php:41
Sabre\VObject\Version\VERSION
const VERSION
Full version number.
Definition:
Version.php:17
fopen
$bench
$bench
Definition:
rrulebench.php:17
$vobj
$vobj
Definition:
rrulebench.php:21
echo
Sabre\VObject\Reader\read
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition:
Reader.php:42
php
libs
composer
vendor
sabre
vobject
bin
rrulebench.php
Generated on Thu Jan 16 2025 19:01:53 for ILIAS by
1.8.13 (using
Doxyfile
)