Created
August 13, 2020 21:30
-
-
Save Mossman1215/dc3c25dd419a4bbe16502daf60de4931 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace SilverStripe\Com\Tasks; | |
use Psr\Log\LoggerInterface; | |
use SilverStripe\Core\Injector\Injector; | |
use SilverStripe\Dev\BuildTask; | |
use SilverStripe\Versioned\Versioned; | |
use SilverStripe\CMS\Model\SiteTree; | |
/** | |
* export site tree for performance testing | |
*/ | |
class ExportSiteTree extends BuildTask | |
{ | |
/** | |
* Set a custom url segment (to follow dev/tasks/) | |
* | |
* @config | |
* @var string | |
*/ | |
private static $segment = 'ExportSiteTree'; | |
public function run($request) | |
{ | |
$livePages = Versioned::get_by_stage(SiteTree::class, Versioned::LIVE); | |
foreach ($livePages as $page) { | |
echo $page->Link().PHP_EOL; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while IFS= read -r line; do | |
ab -n 10 "$line"; | |
done < "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment