PHP アプリのボトルネックの分析に XHProf を使う。
XHProf は PECL 拡張として提供されている。
function ack() | |
{ | |
if git log -0 &> /dev/null ; then | |
echo "You are in git repository so you can grep by git-grep command" | |
else | |
/usr/local/bin/ack $* | |
fi | |
} |
<?php | |
// To run, you need the Symfony\Yaml and Symfony\ClassLoader. | |
// You can get these libraries from PEAR installer by the followings: | |
// $ pear channel-discover pear.symfony.com | |
// $ pear install symfony2/Yaml | |
require_once 'Symfony/Component/Yaml/Yaml.php'; | |
require_once 'Symfony/Component/Yaml/Parser.php'; | |
require_once 'Symfony/Component/Yaml/Inline.php'; |
curl "https://raw.github.com/gist/1044456/dbe6d1d76e18d90c26c0352f6f8f51d9f68d5d4a/list-commit-hash-from-ticket.php" | sed 's/show\/165/show\/190/' | php | awk '{print "git branch --contains="$1"\|grep -q stable-3.6.x && echo "$1}' | sh |
<?php | |
$url = 'http://redmine.openpne.jp/versions/show/165'; | |
function getCommitHashList($path) | |
{ | |
$url = 'http://redmine.openpne.jp'.$path; | |
$text = file_get_contents($url); |
<?php | |
class opInteractiveTaskTestHandler | |
{ | |
public $cli, $t, $lastStatus, $resource = null; | |
public $pipes = array(); | |
public $output = ''; | |
public function __construct($t) |
<?php | |
/** | |
* This file is part of the OpenPNE package. | |
* (c) OpenPNE Project (http://www.openpne.jp/) | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file and the NOTICE file that were distributed with this source code. | |
*/ |
#!/usr/bin/env php | |
<?php | |
print apc_clear_cache('user') ? 'Remove user cache successfully.' : 'Failed to remove user cache.'; | |
echo PHP_EOL; | |
print apc_clear_cache() ? 'Remove system cache successfully.' : 'Failed to remove system cache.'; | |
echo PHP_EOL; |