Browse Source

admin: show php refcount

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@321 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 15 years ago
parent
commit
159ef31736
  1. 2
      admin/common-zh-simplified-utf-8.lang.php
  2. 2
      admin/common-zh-traditional-utf-8.lang.php
  3. 3
      admin/help-en.lang.php
  4. 1
      admin/help-zh-simplified-utf-8.lang.php
  5. 1
      admin/help-zh-traditional-utf-8.lang.php
  6. 6
      admin/xcache.tpl.php
  7. 5
      xcache.c

2
admin/common-zh-simplified-utf-8.lang.php

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

2
admin/common-zh-traditional-utf-8.lang.php

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

3
admin/help-en.lang.php

@ -21,8 +21,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>

1
admin/help-zh-simplified-utf-8.lang.php

@ -23,6 +23,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>

1
admin/help-zh-traditional-utf-8.lang.php

@ -23,6 +23,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>

6
admin/xcache.tpl.php

@ -157,6 +157,7 @@ if ($cachelist) {
echo '<col align="right" />';
echo '<col align="right" />';
echo '<col align="right" />';
echo '<col align="right" />';
}
echo "
@ -169,6 +170,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) { ?>
@ -191,7 +193,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) {
@ -212,6 +215,7 @@ if ($cachelist) {
ENTRY;
if ($isphp) {
echo <<<ENTRY
<td int="{$entry['phprefcount']}">{$phprefcount}</td>
<td int="{$entry['sourcesize']}">{$sourcesize}</td>
<td int="{$entry['mtime']}">{$mtime}</td>
ENTRY;

5
xcache.c

@ -501,7 +501,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);
@ -532,6 +531,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"), entry->device);
@ -548,8 +549,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:

Loading…
Cancel
Save