Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1821215
rrulebench.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
741 B
Subscribers
None
rrulebench.php
View Options
<?php
include
__DIR__
.
'/../vendor/autoload.php'
;
if
(
$argc
<
4
)
{
echo
"sabre/vobject "
,
Sabre\VObject\Version
::
VERSION
,
" RRULE benchmark
\n
"
;
echo
"
\n
"
;
echo
"This script can be used to measure the speed of the 'recurrence expansion'
\n
"
;
echo
"system."
;
echo
"
\n
"
;
echo
"Usage: "
.
$argv
[
0
]
.
" inputfile.ics startdate enddate
\n
"
;
die
();
}
list
(,
$inputFile
,
$startDate
,
$endDate
)
=
$argv
;
$bench
=
new
Hoa\Bench\Bench
();
$bench
->
parse
->
start
();
echo
"Parsing.
\n
"
;
$vobj
=
Sabre\VObject\Reader
::
read
(
fopen
(
$inputFile
,
'r'
));
$bench
->
parse
->
stop
();
echo
"Expanding.
\n
"
;
$bench
->
expand
->
start
();
$vobj
->
expand
(
new
DateTime
(
$startDate
),
new
DateTime
(
$endDate
));
$bench
->
expand
->
stop
();
echo
$bench
,
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Dec 23, 9:20 AM (11 h, 50 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
915251
Default Alt Text
rrulebench.php (741 B)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment