1
0
Fork 0

merged r318,r321 from trunk

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.3@596 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
Xuefer 2009-07-05 04:57:59 +00:00
parent 47f276fc5a
commit 5b4013aff7
8 changed files with 18 additions and 4 deletions

View File

@ -40,4 +40,4 @@ xcachesvnclean: clean
xcachetest:
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(srcdir)/run-xcachetest -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS) -c $(srcdir)/xcache-test.ini
$(srcdir)/run-xcachetest -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS) $(TEST_ARGS) -c $(srcdir)/xcache-test.ini

View File

@ -50,6 +50,8 @@ $strings = array(
=> '项目',
'Refcount'
=> '引用数',
'PhpShared'
=> '共享',
'SrcSize'
=> '源大小',
'Modify'

View File

@ -50,6 +50,8 @@ $strings = array(
=> '項目',
'Refcount'
=> '引用數',
'PhpShared'
=> '共享',
'SrcSize'
=> '原始檔案大小',
'Modify'

View File

@ -22,8 +22,9 @@
<dl>
<dt><?php echo _T('entry'); ?>: </dt><dd>The entry name or filename</dd>
<dt><?php echo _T('Hits'); ?>: </dt><dd>Times this entry is hit (loaded from this cache)</dd>
<dt><?php echo _T('Refcount'); ?>: </dt><dd>Reference count this entry is holded by a php request</dd>
<dt><?php echo _T('Refcount'); ?>: </dt><dd>Reference count of this entry is holded by a php request</dd>
<dt><?php echo _T('Size'); ?>: </dt><dd>Size in bytes of this entry in the cache</dd>
<dt><?php echo _T('PhpShared'); ?>: </dt><dd>Count of entry sharing this php data</dd>
<dt><?php echo _T('SrcSize'); ?>: </dt><dd>Size of the source file</dd>
<dt><?php echo _T('Modify'); ?>: </dt><dd>Last modified time of the source file</dd>
<dt><?php echo _T('device'); ?>: </dt><dd>device number of the source file</dd>

View File

@ -24,6 +24,7 @@
<dt><?php echo _T('Hits'); ?>: </dt><dd>该项目被命中的次数 (从共享内存区载入)</dd>
<dt><?php echo _T('Refcount'); ?>: </dt><dd>项目依然被其他进程占据的引用次数</dd>
<dt><?php echo _T('Size'); ?>: </dt><dd>项目在共享内存里占用字节数</dd>
<dt><?php echo _T('PhpShared'); ?>: </dt><dd>与本项目相同 PHP 代码的个数</dd>
<dt><?php echo _T('SrcSize'); ?>: </dt><dd>源文件大小</dd>
<dt><?php echo _T('Modify'); ?>: </dt><dd>源文件最后修改时间</dd>
<dt><?php echo _T('device'); ?>: </dt><dd>源文件所在设备ID</dd>

View File

@ -24,6 +24,7 @@
<dt><?php echo _T('Hits'); ?>: </dt><dd>該項目被命中的次數 (從共享記憶體區載入)</dd>
<dt><?php echo _T('Refcount'); ?>: </dt><dd>項目依然被其他程序佔用的引用次數</dd>
<dt><?php echo _T('Size'); ?>: </dt><dd>項目在共享記憶體裡佔用位元數</dd>
<dt><?php echo _T('PhpShared'); ?>: </dt><dd>與本項目相同 PHP 內容的个數</dd>
<dt><?php echo _T('SrcSize'); ?>: </dt><dd>原始檔案大小</dd>
<dt><?php echo _T('Modify'); ?>: </dt><dd>原始檔案最後修改時間</dd>
<dt><?php echo _T('device'); ?>: </dt><dd>原始檔案所在設備ID</dd>

View File

@ -147,6 +147,7 @@ if ($cachelist) {
echo '<col align="right" />';
echo '<col align="right" />';
echo '<col align="right" />';
echo '<col align="right" />';
}
echo "
@ -162,6 +163,7 @@ if ($cachelist) {
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Refcount'); ?></a></th>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Size'); ?></a></th>
<?php if ($isphp) { ?>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('PhpShared'); ?></a></th>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('SrcSize'); ?></a></th>
<th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Modify'); ?></a></th>
<?php if ($haveinode) { ?>
@ -184,7 +186,8 @@ if ($cachelist) {
$refcount = number_format($entry['refcount']);
$size = size($entry['size']);
if ($isphp) {
$sourcesize = size($entry['sourcesize']);
$sourcesize = size($entry['sourcesize']);
$phprefcount = number_format($entry['phprefcount']);
}
if ($isphp) {
@ -216,6 +219,7 @@ ENTRY;
ENTRY;
if ($isphp) {
echo <<<ENTRY
<td int="{$entry['phprefcount']}">{$phprefcount}</td>
<td int="{$entry['sourcesize']}">{$sourcesize}</td>
<td int="{$entry['mtime']}">{$mtime}</td>
ENTRY;

View File

@ -445,7 +445,6 @@ static void xc_fillentry_dmz(xc_entry_t *entry, int del, zval *list TSRMLS_DC) /
ALLOC_INIT_ZVAL(ei);
array_init(ei);
add_assoc_long_ex(ei, ZEND_STRS("size"), entry->size);
add_assoc_long_ex(ei, ZEND_STRS("refcount"), entry->refcount);
add_assoc_long_ex(ei, ZEND_STRS("hits"), entry->hits);
add_assoc_long_ex(ei, ZEND_STRS("ctime"), entry->ctime);
@ -476,6 +475,8 @@ static void xc_fillentry_dmz(xc_entry_t *entry, int del, zval *list TSRMLS_DC) /
switch (entry->type) {
case XC_TYPE_PHP:
php = entry->data.php;
add_assoc_long_ex(ei, ZEND_STRS("size"), entry->size + php->size);
add_assoc_long_ex(ei, ZEND_STRS("phprefcount"), php->refcount);
add_assoc_long_ex(ei, ZEND_STRS("sourcesize"), php->sourcesize);
#ifdef HAVE_INODE
add_assoc_long_ex(ei, ZEND_STRS("device"), php->device);
@ -492,8 +493,10 @@ static void xc_fillentry_dmz(xc_entry_t *entry, int del, zval *list TSRMLS_DC) /
add_assoc_long_ex(ei, ZEND_STRS("autoglobal_cnt"),php->autoglobal_cnt);
#endif
break;
case XC_TYPE_VAR:
var = entry->data.var;
add_assoc_long_ex(ei, ZEND_STRS("size"), entry->size);
break;
default: