@@ -1781,6 +1781,46 @@ PHP_FUNCTION(vips_version)
1781
1781
}
1782
1782
/* }}} */
1783
1783
1784
+ /* {{{ proto integer vips_cache_get_max_mem()
1785
+ Get max memory to use for operation cache */
1786
+ PHP_FUNCTION (vips_cache_get_max_mem )
1787
+ {
1788
+ RETURN_LONG (vips_cache_get_max_mem ());
1789
+ }
1790
+ /* }}} */
1791
+
1792
+ /* {{{ proto integer vips_cache_get_max_files()
1793
+ Get max number of open files for operation cache */
1794
+ PHP_FUNCTION (vips_cache_get_max_files )
1795
+ {
1796
+ RETURN_LONG (vips_cache_get_max_files ());
1797
+ }
1798
+ /* }}} */
1799
+
1800
+ /* {{{ proto integer vips_cache_get_max()
1801
+ Get max number of operations to cache */
1802
+ PHP_FUNCTION (vips_cache_get_max )
1803
+ {
1804
+ RETURN_LONG (vips_cache_get_max ());
1805
+ }
1806
+ /* }}} */
1807
+
1808
+ /* {{{ proto integer vips_cache_get_size()
1809
+ Get current cached operations */
1810
+ PHP_FUNCTION (vips_cache_get_size )
1811
+ {
1812
+ RETURN_LONG (vips_cache_get_size ());
1813
+ }
1814
+ /* }}} */
1815
+
1816
+ /* {{{ proto integer vips_concurrency_get()
1817
+ Get number of workers per threadpool */
1818
+ PHP_FUNCTION (vips_concurrency_get )
1819
+ {
1820
+ RETURN_LONG (vips_concurrency_get ());
1821
+ }
1822
+ /* }}} */
1823
+
1784
1824
/* {{{ php_vips_init_globals
1785
1825
*/
1786
1826
/* Uncomment this function if you have INI entries
@@ -1930,7 +1970,22 @@ PHP_MINFO_FUNCTION(vips)
1930
1970
vips_snprintf (digits , 256 , "%d" , vips_version (2 ));
1931
1971
php_info_print_table_row (2 , "Micro version" , digits );
1932
1972
1933
- php_info_print_table_row (2 , "SIMD support with liborc" ,
1973
+ vips_snprintf (digits , 256 , "%zd" , vips_cache_get_max_mem ());
1974
+ php_info_print_table_row (2 , "Cache max mem" , digits );
1975
+
1976
+ vips_snprintf (digits , 256 , "%d" , vips_cache_get_max ());
1977
+ php_info_print_table_row (2 , "Cache max operations" , digits );
1978
+
1979
+ vips_snprintf (digits , 256 , "%d" , vips_cache_get_size ());
1980
+ php_info_print_table_row (2 , "Cache current operations" , digits );
1981
+
1982
+ vips_snprintf (digits , 256 , "%d" , vips_cache_get_max_files ());
1983
+ php_info_print_table_row (2 , "Cache max open files" , digits );
1984
+
1985
+ vips_snprintf (digits , 256 , "%d" , vips_concurrency_get ());
1986
+ php_info_print_table_row (2 , "Concurrency" , digits );
1987
+
1988
+ php_info_print_table_row (2 , "SIMD support with liborc" ,
1934
1989
vips_vector_isenabled () ? "yes" : "no" );
1935
1990
1936
1991
php_info_print_table_row (2 , "JPEG support" ,
@@ -2074,6 +2129,21 @@ ZEND_BEGIN_ARG_INFO(arginfo_vips_concurrency_set, 0)
2074
2129
ZEND_ARG_INFO (0 , value )
2075
2130
ZEND_END_ARG_INFO ()
2076
2131
2132
+ ZEND_BEGIN_ARG_INFO (arginfo_vips_cache_get_max , 0 )
2133
+ ZEND_END_ARG_INFO ()
2134
+
2135
+ ZEND_BEGIN_ARG_INFO (arginfo_vips_cache_get_max_mem , 0 )
2136
+ ZEND_END_ARG_INFO ()
2137
+
2138
+ ZEND_BEGIN_ARG_INFO (arginfo_vips_cache_get_max_files , 0 )
2139
+ ZEND_END_ARG_INFO ()
2140
+
2141
+ ZEND_BEGIN_ARG_INFO (arginfo_vips_cache_get_size , 0 )
2142
+ ZEND_END_ARG_INFO ()
2143
+
2144
+ ZEND_BEGIN_ARG_INFO (arginfo_vips_concurrency_get , 0 )
2145
+ ZEND_END_ARG_INFO ()
2146
+
2077
2147
ZEND_BEGIN_ARG_INFO (arginfo_vips_version , 0 )
2078
2148
ZEND_END_ARG_INFO ()
2079
2149
/* {{{ vips_functions[]
@@ -2103,6 +2173,11 @@ const zend_function_entry vips_functions[] = {
2103
2173
PHP_FE (vips_cache_set_max_mem , arginfo_vips_cache_set_max_mem )
2104
2174
PHP_FE (vips_cache_set_max_files , arginfo_vips_cache_set_max_files )
2105
2175
PHP_FE (vips_concurrency_set , arginfo_vips_concurrency_set )
2176
+ PHP_FE (vips_cache_get_max , arginfo_vips_cache_get_max )
2177
+ PHP_FE (vips_cache_get_max_mem , arginfo_vips_cache_get_max_mem )
2178
+ PHP_FE (vips_cache_get_max_files , arginfo_vips_cache_get_max_files )
2179
+ PHP_FE (vips_cache_get_size , arginfo_vips_cache_get_size )
2180
+ PHP_FE (vips_concurrency_get , arginfo_vips_concurrency_get )
2106
2181
PHP_FE (vips_version , arginfo_vips_version )
2107
2182
2108
2183
PHP_FE_END /* Must be the last line in vips_functions[] */
0 commit comments