Changeset 537


Ignore:
Timestamp:
2008-03-02T06:43:01+01:00 (6 years ago)
Author:
moo
Message:

added cache init time and instance id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.c

    r533 r537  
    8787 
    8888static zend_bool xc_initized = 0; 
     89static time_t xc_init_time = 0; 
     90static long unsigned xc_init_instance_id = 0; 
     91#ifdef ZTS 
     92static long unsigned xc_init_instance_subid = 0; 
     93#endif 
    8994static zend_compile_file_t *origin_compile_file = NULL; 
    9095static zend_compile_file_t *old_compile_file = NULL; 
     
    27692774    php_info_print_table_row(2, "Modules Built", XCACHE_MODULES); 
    27702775    php_info_print_table_row(2, "Readonly Protection", xc_readonly_protection ? "enabled" : "N/A"); 
     2776    ptr = php_format_date("Y-m-d H:i:s", sizeof("Y-m-d H:i:s") - 1, xc_init_time, 1 TSRMLS_CC); 
     2777    php_info_print_table_row(2, "Cache Init Time", ptr); 
     2778    efree(ptr); 
     2779 
     2780#ifdef ZTS 
     2781    snprintf(buf, sizeof(buf), "%lu.%lu", xc_init_instance_id, xc_init_instance_subid); 
     2782#else 
     2783    snprintf(buf, sizeof(buf), "%lu", xc_init_instance_id); 
     2784#endif 
     2785    php_info_print_table_row(2, "Cache Instance Id", buf); 
    27712786 
    27722787    if (xc_php_size) { 
     
    30033018        } 
    30043019        xc_initized = 1; 
     3020        xc_init_time = time(NULL); 
     3021        xc_init_instance_id = getpid(); 
     3022#ifdef ZTS 
     3023        xc_init_instance_subid = tsrm_thread_id(); 
     3024#endif 
    30053025    } 
    30063026 
Note: See TracChangeset for help on using the changeset viewer.