PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.8
Booking for Appointments and Events Calendar – Amelia v2.4.8
2.4.8 2.4.7 2.4.6 2.4.5 2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / vendor / sabre / vobject / bin / bench_freebusygenerator.php
ameliabooking / vendor / sabre / vobject / bin Last commit date
bench.php 7 months ago bench_freebusygenerator.php 7 months ago bench_manipulatevcard.php 7 months ago fetch_windows_zones.php 1 year ago generate_vcards 1 year ago generateicalendardata.php 7 months ago mergeduplicates.php 7 months ago rrulebench.php 7 months ago vobject 1 year ago
bench_freebusygenerator.php
41 lines
1 <?php
2
3 include __DIR__ . '/../vendor/autoload.php';
4 if ($argc < 2) {
5 echo 'sabre/vobject ', \AmeliaVendor\Sabre\VObject\Version::VERSION, " freebusy benchmark\n";
6 echo "\n";
7 echo "This script can be used to measure the speed of generating a\n";
8 echo "free-busy report based on a calendar.\n";
9 echo "\n";
10 echo "The process will be repeated 100 times to get accurate stats\n";
11 echo "\n";
12 echo 'Usage: ' . $argv[0] . " inputfile.ics\n";
13 exit;
14 }
15 list(, $inputFile) = $argv;
16 $bench = new Hoa\Bench\Bench();
17 $bench->parse->start();
18 $vcal = \AmeliaVendor\Sabre\VObject\Reader::read(fopen($inputFile, 'r'));
19 $bench->parse->stop();
20 $repeat = 100;
21 $start = new \DateTime('2000-01-01');
22 $end = new \DateTime('2020-01-01');
23 $timeZone = new \DateTimeZone('America/Toronto');
24 $bench->fb->start();
25 for ($i = 0; $i < $repeat; ++$i) {
26 $fb = new \AmeliaVendor\Sabre\VObject\FreeBusyGenerator($start, $end, $vcal, $timeZone);
27 $results = $fb->getResult();
28 }
29 $bench->fb->stop();
30 echo $bench, "\n";
31 function formatMemory($input)
32 {
33 if (strlen($input) > 6) {
34 return round($input / (1024 * 1024)) . 'M';
35 } elseif (strlen($input) > 3) {
36 return round($input / 1024) . 'K';
37 }
38 }
39 unset($input, $splitter);
40 echo 'peak memory usage: ' . formatMemory(memory_get_peak_usage()), "\n";
41 echo 'current memory usage: ' . formatMemory(memory_get_usage()), "\n";