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