如何在開發的過程中加入測試。
- Model
- Repository
- Controller
- Auth
Linux中常用的監控CPU整體性能的工具有: | |
§ mpstat: mpstat 不但能查看所有CPU的平均信息,還能查看指定CPU的信息。 | |
§ vmstat:只能查看所有CPU的平均信息;查看cpu隊列信息; | |
§ iostat: 只能查看所有CPU的平均信息。 | |
§ sar: 與mpstat 一樣,不但能查看CPU的平均信息,還能查看指定CPU的信息。 |
This gist will explain you how to enable an undocumented feature of PHP-FPM
which will give a real-time performance stats.
Everybody knows the famous phpinfo()
and the page it generates, right? Then the real-time PHP-FPM
status page design is very similar.
Some informations from the top are not displayed to avoid security issues.
This procedure is tested on Mac OS X 10.8 with Developpers tools installed (xCode).
PHP 5.4 installed with Homebrew.
Update: I wrote a blog post about this.
Download the following files from Oracle website (yes, you need to create an account and accept terms):
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
// use vanilla JS because why not | |
window.addEventListener("load", function() { | |
// create websocket instance | |
var mySocket = new WebSocket("ws://localhost:8080/ws"); | |
brew install tinyproxy | |
tinyproxy -c /usr/local/etc/tinyproxy/tinyproxy.conf -d | |
Tests: | |
NO AUTH | |
curl -iv --noproxy "*" --location http://www.google.com | |
AUTH FAIL |