- Timestamp:
- 07/27/2012 06:03:21 PM (10 months ago)
- Location:
- trunk
- Files:
-
- 6 modified
-
htdocs/cacher/cacher-en.lang.php (modified) (3 diffs)
-
htdocs/cacher/cacher-zh-simplified.lang.php (modified) (3 diffs)
-
htdocs/cacher/cacher-zh-traditional.lang.php (modified) (3 diffs)
-
htdocs/cacher/cacher.tpl.php (modified) (6 diffs)
-
htdocs/common/common.php (modified) (1 diff)
-
mod_cacher/xc_cacher.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/htdocs/cacher/cacher-en.lang.php
r1053 r1063 18 18 'cache.operations' 19 19 => 'Operations|Press the clear button to clean this cache', 20 'cache. compiling'21 => ' Comp.|Compiling flag, "yes" if the cache is busy compiling php script',20 'cache.status' 21 => 'Status|Compiling flag, "Compiling" if the cache is busy compiling php script. "Disabled" if cache is disabled', 22 22 'cache.hits' 23 23 => 'Hits|Cache Hits, hit=a var/php is loaded from this cache', … … 30 30 'cache.updates' 31 31 => 'Updates|Cache Updates', 32 'cache. clogs'33 => ' Clogs|Compiling Clogs, clog=compiling is needed but avoided to wait(be blocked) when the cache is busy compiling already',32 'cache.skips' 33 => 'Skips|Skips. Skip=updates are needed but skipped for some reason. e.g.: other process/thread is busy compiling on this cache', 34 34 'cache.ooms' 35 35 => 'OOMs|Out Of Memory, how many times a new item should be stored but there isn\'t enough memory in the cache, think of increasing the xcache.size or xcache.var_size', … … 49 49 => 'Entry name|The entry name or filename', 50 50 'entry.hits' 51 => 'Hits| Times this entry is hit(loaded from this cache)',51 => 'Hits|Hit times of this entry (loaded from this cache)', 52 52 'entry.size' 53 53 => 'Size|Size in bytes of this entry in the cache', -
trunk/htdocs/cacher/cacher-zh-simplified.lang.php
r1053 r1063 16 16 'Hits' 17 17 => '命中', 18 'Normal' 19 => '正常', 20 'Compiling(%s)' 21 => '编译中(%s)', 18 22 'Modify' 19 23 => '修改', … … 68 72 'cache.operations' 69 73 => '操作|点击按钮清除对应共享内存区的数据', 70 'cache. compiling'71 => ' 编译中|编译标记, 当共享内存区正在编译 php 脚本时标记为 "yes"',74 'cache.status' 75 => '状态|状态标记. 当共享内存区正在编译 php 脚本时标记为 "编译中". 当共享内存区暂停使用时标记为 "禁用"', 72 76 'cache.hits' 73 77 => '命中|共享内存命中次数, 命中=从该共享内存载入php或者变量', … … 80 84 'cache.updates' 81 85 => '更新|共享内存更新次数', 82 'cache. clogs'83 => '阻塞| 编译阻塞跳过, 阻塞=当需该共享内存区负责编译时, 其他进程/现成无法访问此共享内存.跳过=XCache 自动判断阻塞的共享内存区自动跳过阻塞等待, 直接使用非共享内存方式继续处理请求',86 'cache.skips' 87 => '阻塞|跳过更新次数, 跳过=XCache 自动判断阻塞的共享内存区自动跳过阻塞等待, 直接使用非共享内存方式继续处理请求', 84 88 'cache.ooms' 85 89 => '内存不足|内存不足次数, 显示需要存储新数据但是共享内存区内存不足的次数. 如果出现太频繁请考虑加大配置中的 xcache.size 或者 xcache.var_size', -
trunk/htdocs/cacher/cacher-zh-traditional.lang.php
r1053 r1063 16 16 'Hits' 17 17 => '命中', 18 'Normal' 19 => '正常', 20 'Compiling(%s)' 21 => '編譯中(%s)', 18 22 'Modify' 19 23 => '修改', … … 68 72 'cache.operations' 69 73 => '操作按鈕|點擊按鈕清除對應共享記憶體區的資料', 70 'cache. compiling'71 => ' 編譯中|編譯標記,當共享記憶體區正在編譯 php 指令時標記為 "yes"',74 'cache.status' 75 => '狀態|狀態標記. 當共享內存區正在編譯 php 腳本時標記為 "編譯中". 當共享內存區暫停使用時標記為 "禁用"', 72 76 'cache.hits' 73 77 => '命中|共享記憶體命中次數,命中=從該共享記憶體載入php或者變數', … … 80 84 'cache.updates' 81 85 => '更新|共享記憶更新過次數', 82 'cache. clogs'83 => ' 阻塞|編譯阻塞跳過,阻塞=當需該共享記憶體區負責編譯時,其他程序/現成無法存取此共享記憶體.跳過=XCache 自動判斷阻塞的共享記憶體區自動跳過阻塞等待,直接使用非共享記憶體方式繼續處理請求',86 'cache.skips' 87 => '跳過|跳過更新次數,跳過=XCache 自動判斷阻塞的共享記憶體區自動跳過阻塞等待,直接使用非共享記憶體方式繼續處理請求', 84 88 'cache.ooms' 85 89 => '記憶體不足|記憶體不足次數,顯示需要儲存新資料但是共享記憶體區記憶體不足的次數. 如果出現太頻繁請考慮加大配置中的 xcache.size 或者 xcache.var_size', -
trunk/htdocs/cacher/cacher.tpl.php
r1058 r1063 36 36 , th(N_("cache.blocksgraph")) 37 37 , th(N_("cache.operations")) 38 , th(N_("cache. compiling"))38 , th(N_("cache.status")) 39 39 , th(N_("cache.hits")) 40 40 , th(N_("cache.hits_graph")) … … 42 42 , th(N_("cache.hits_avg_s")) 43 43 , th(N_("cache.updates")) 44 , th(N_("cache. clogs"))44 , th(N_("cache.skips")) 45 45 , th(N_("cache.ooms")) 46 46 , th(N_("cache.errors")) … … 53 53 </tr> 54 54 <?php 55 $numkeys = explode(',', 'slots,size,avail,hits,updates, clogs,ooms,errors,cached,deleted');55 $numkeys = explode(',', 'slots,size,avail,hits,updates,skips,ooms,errors,cached,deleted'); 56 56 $l_clear = _('Clear'); 57 57 $l_clear_confirm = _('Sure to clear?'); … … 88 88 89 89 if (!empty($ci['istotal'])) { 90 $ci[' compiling']= '-';90 $ci['status'] = '-'; 91 91 $ci['can_readonly'] = '-'; 92 92 } 93 93 else { 94 $ci['compiling'] = $ci['type'] == $type_php ? ($ci['compiling'] ? 'yes' : 'no') : '-'; 94 if ($ci['type'] == $type_php) { 95 $ci['status'] = $ci['compiling'] ? sprintf(_('Compiling(%s)'), age($ci['compiling'])) : _('Normal'); 96 } 97 else { 98 $ci['status'] = '-'; 99 } 95 100 $ci['can_readonly'] = $ci['can_readonly'] ? 'yes' : 'no'; 96 101 } … … 115 120 ></form 116 121 ></td> 117 <td>{$ci[' compiling']}</td>122 <td>{$ci['status']}</td> 118 123 <td>{$ci['hits']}</td> 119 124 <td><div class="hitsgraph" style="width: {$hits_graph_h_w}px">{$hits_graph_h}</div></td> … … 121 126 <td>{$hits_avg_s}</td> 122 127 <td>{$ci['updates']}</td> 123 <td>{$ci[' clogs']}</td>128 <td>{$ci['skips']}</td> 124 129 <td>{$ci['ooms']}</td> 125 130 <td>{$ci['errors']}</td> -
trunk/htdocs/common/common.php
r1056 r1063 182 182 if ($delta >= $seconds[$i]) { 183 183 $ret = (int) ($delta / $seconds[$i]); 184 return $ret . ' ' .$name[$i];185 } 186 } 187 188 return '0 s';184 return $ret . $name[$i]; 185 } 186 } 187 188 return '0s'; 189 189 } 190 190 -
trunk/mod_cacher/xc_cacher.c
r1062 r1063 71 71 zend_ulong updates; 72 72 zend_ulong hits; 73 zend_ulong clogs;73 zend_ulong skips; 74 74 zend_ulong ooms; 75 75 zend_ulong errors; … … 617 617 add_assoc_long_ex(return_value, ZEND_STRS("misses"), cached->updates); /* deprecated */ 618 618 add_assoc_long_ex(return_value, ZEND_STRS("hits"), cached->hits); 619 add_assoc_long_ex(return_value, ZEND_STRS("clogs"), cached->clogs); 619 add_assoc_long_ex(return_value, ZEND_STRS("skips"), cached->skips); 620 add_assoc_long_ex(return_value, ZEND_STRS("clogs"), cached->skips); /* deprecated */ 620 621 add_assoc_long_ex(return_value, ZEND_STRS("ooms"), cached->ooms); 621 622 add_assoc_long_ex(return_value, ZEND_STRS("errors"), cached->errors); … … 2048 2049 xc_sandboxed_compiler_t sandboxed_compiler; 2049 2050 2050 /* stale clogs precheck */2051 /* stale skips precheck */ 2051 2052 if (XG(request_time) - cache->cached->compiling < 30) { 2052 cache->cached-> clogs ++;2053 cache->cached->skips ++; 2053 2054 return old_compile_file(h, type TSRMLS_CC); 2054 2055 } … … 2110 2111 if (XG(request_time) - cache->cached->compiling < 30) { 2111 2112 TRACE("%s", "miss php, but compiling"); 2112 cache->cached-> clogs ++;2113 cache->cached->skips ++; 2113 2114 gaveup = 1; 2114 2115 break; … … 2297 2298 xc_lock_destroy(cache->lck); 2298 2299 } 2299 /* do NOT free 2300 if (cache->entries) { 2301 cache->mem->handlers->free(cache->mem, cache->entries); 2302 } 2303 cache->mem->handlers->free(cache->mem, cache); 2304 */ 2300 /* do NOT touch cached data */ 2305 2301 shm = cache->shm; 2306 2302 cache->shm->handlers->memdestroy(cache->mem);

