对web性能测试-/ab/webbench/Loadrunner
apache 自带的ab
http://www.chedong.com/blog/archives/001154.html
loadrunner
使用方法:
看看很好的教程:
公司外分享版本-结合逍遥问问讲解如何利用LoadRunner进行性能测试104
来自于:这里
apache 自带的ab
http://www.chedong.com/blog/archives/001154.html
loadrunner
使用方法:
看看很好的教程:
公司外分享版本-结合逍遥问问讲解如何利用LoadRunner进行性能测试104
来自于:这里
secureCRT -> script -> start recording script
开始录入脚本
su -
输入密码
secureCRT -> script -> stop recording script
这时要保存!
options ->session options -> connection ->logon scripts -> logon script 选择你刚才的脚本!
1.去官网下载:www.memcached.org
wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
tar zxvf memcached-1.4.5.tar.gz
cd memcached-1.4.5
./configure
make
make install
2.配置:
/usr/local/bin/memcached -d -u nobody -m 512 -p 11211 127.0.0.1
会报错:
error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
这时需要:
使用LD_DEBUG=help ./memcached -v来确定 加载的类库路径,方法如下:
LD_DEBUG=libs ./memcached -v 2>&1 > /dev/null | less
参考:http://blogold.chinaunix.net/u2/70049/showart_1665279.html
看看少哪个
我这里是:
ln -s /usr/local/lib/libevent-1.4.so.2 /lib64/libevent-1.4.so.2
/usr/local/bin/memcached -d -u nobody -m 512 -p 11211 127.0.0.1
再去看看有没有启动端口!
netstat -anl |grep 11211
查看 telnet 127.0.0.1 11211
stats 看命中情况
KO!
查看memcache数据PHP代码:
function printDetails($status){ echo "<table border='1'>"; echo "<tr><td>Memcache Server version:</td><td> ".$status ["version"]."</td></tr>"; echo "<tr><td>Process id of this server process </td><td>".$status ["pid"]."</td></tr>"; echo "<tr><td>Number of seconds this server has been running </td><td>".$status ["uptime"]."</td></tr>"; echo "<tr><td>Accumulated user time for this process </td><td>".$status ["rusage_user"]." seconds</td></tr>"; echo "<tr><td>Accumulated system time for this process </td><td>".$status ["rusage_system"]." seconds</td></tr>"; echo "<tr><td>Total number of items stored by this server ever since it started </td><td>".$status ["total_items"]."</td></tr>"; echo "<tr><td>Number of open connections </td><td>".$status ["curr_connections"]."</td></tr>"; echo "<tr><td>Total number of connections opened since the server started running </td><td>".$status ["total_connections"]."</td></tr>"; echo "<tr><td>Number of connection structures allocated by the server </td><td>".$status ["connection_structures"]."</td></tr>"; echo "<tr><td>Cumulative number of retrieval requests </td><td>".$status ["cmd_get"]."</td></tr>"; echo "<tr><td> Cumulative number of storage requests </td><td>".$status ["cmd_set"]."</td></tr>"; $percCacheHit=((real)$status ["get_hits"]/ (real)$status ["cmd_get"] *100); $percCacheHit=round($percCacheHit,3); $percCacheMiss=100-$percCacheHit; echo "<tr><td>Number of keys that have been requested and found present </td><td>".$status ["get_hits"]." ($percCacheHit%)</td></tr>"; echo "<tr><td>Number of items that have been requested and not found </td><td>".$status ["get_misses"]."($percCacheMiss%)</td></tr>"; $MBRead= (real)$status["bytes_read"]/(1024*1024); echo "<tr><td>Total number of bytes read by this server from network </td><td>".$MBRead." Mega Bytes</td></tr>"; $MBWrite=(real) $status["bytes_written"]/(1024*1024) ; echo "<tr><td>Total number of bytes sent by this server to network </td><td>".$MBWrite." Mega Bytes</td></tr>"; $MBSize=(real) $status["limit_maxbytes"]/(1024*1024) ; echo "<tr><td>Number of bytes this server is allowed to use for storage.</td><td>".$MBSize." Mega Bytes</td></tr>"; echo "<tr><td>Number of valid items removed from cache to free memory for new items.</td><td>".$status ["evictions"]."</td></tr>"; echo "</table>"; } $memcache_obj = new Memcache; $memcache_obj->addServer('memcache_host', 11211); printDetails($memcache_obj->getStats()); |
来源:http://php.net/manual/en/memcache.getstats.php
参考来源:
http://active.tutsplus.com/tutorials/workflow/using-amfphp-with-as3-and-codeignitor/
这里要看的步骤是:
从:Step 19: Installing CodeIgniter 开始配置就可以了:
上面可以慢点看
但因为提供的源代码是1.7.1 上面很多代码都过期了,会出现很多错误,所以我们要改成1.7.3 来配置。
基本上成功可以,但一些文件格式可能要直接复制他的比较好,因为utf-8编码的问题,可能amf格式不正确
测试地址:
http://j.etwong.com/amftest/amfphp/browser/
选择CI
输入:main(控制器)和args [99,100]
就可以看到输出了
也可以用amfexplorer 看到结果输出
下载已经配置好的:
http://j.etwong.com/amftest/php.rar
Loadrunner确实是个大家伙,但是不错的大家伙。
1.常见:
[code]
import flash.display.Sprite;
import flash.display.SimpleButton;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.ProgressEvent;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.net.URLRequest;
import flash.text.TextField;
import flash.filters.BlurFilter;
import flash.text.TextFormat;
import flash.display.Loader;
import flash.display.Stage;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import fl.transitions.Tween;
import fl.transitions.Tween;
import fl.transitions.easing.*;
[/code]
其中flash包和fl包有什么区别呢?
答:
flash 包是 Flash CS 和 Flex 共用的包,是 ActionScript 3 的基础包。
fl 包是 Flash CS 组件相关的包。Flash CS 专有包。
mx 包是 Flex 组件相关的包。Flex 专有包。
flash包是FlashPlayer的核心
fl包和mx包都是扩展自flash包
fl用于flash
mx用于flex