Skip to content

Commit 095f483

Browse files
committed
add more php_info() output
Add output to php-info for some basic memory stats. See libvips/php-vips#97
1 parent c605a80 commit 095f483

File tree

5 files changed

+25
-9
lines changed

5 files changed

+25
-9
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
vips extension changelog
22

3+
Version 1.0.11 (2020-1-xx)
4+
--------------------------
5+
* More php_info() output [jcupitt]
6+
https://github.com/libvips/php-vips/issues/97
7+
38
Version 1.0.10 (2018-12-xx)
49
--------------------------
510
* Fix win32 build [TBK]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ libvips website, or build your own.
9191
$ pear package
9292
```
9393

94-
to make `vips-1.0.9.tgz`.
94+
To make `vips-1.0.11.tgz`.
9595

9696
To install by hand:
9797

package.xml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ http://pear.php.net/dtd/package-2.0.xsd">
1515
<email>jcupitt@php.net</email>
1616
<active>yes</active>
1717
</lead>
18-
<date>2019-09-26</date>
18+
<date>2020-01-09</date>
1919
<version>
20-
<release>1.0.10</release>
20+
<release>1.0.11</release>
2121
<api>1.0.0</api>
2222
</version>
2323
<stability>
@@ -26,9 +26,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
2626
</stability>
2727
<license filesource="LICENSE.txt">MIT</license>
2828
<notes>
29-
* Add vips_image_write_to_array() [jcupitt]
30-
* Update links for new home [jcupitt]
31-
* Fix win32 build [TBK]
29+
* More php_info() output [jcupitt]
3230
</notes>
3331
<contents>
3432
<dir name="/">
@@ -100,6 +98,15 @@ http://pear.php.net/dtd/package-2.0.xsd">
10098
</extsrcrelease>
10199
<changelog>
102100

101+
<release>
102+
<stability><release>stable</release><api>stable</api></stability>
103+
<version><release>1.0.11</release><api>1.0.0</api></version>
104+
<date>2020-1-9</date>
105+
<notes>
106+
* More php_info() output [jcupitt]
107+
</notes>
108+
</release>
109+
103110
<release>
104111
<stability><release>stable</release><api>stable</api></stability>
105112
<version><release>1.0.10</release><api>1.0.0</api></version>

vips-1.0.11.tgz

546 KB
Binary file not shown.

vips.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,16 +2058,20 @@ PHP_MINFO_FUNCTION(vips)
20582058

20592059
vips_snprintf(digits, 256, "%zd", vips_cache_get_max_mem());
20602060
php_info_print_table_row(2, "Cache max mem", digits);
2061-
20622061
vips_snprintf(digits, 256, "%d", vips_cache_get_max());
20632062
php_info_print_table_row(2, "Cache max operations", digits);
2064-
20652063
vips_snprintf(digits, 256, "%d", vips_cache_get_size());
20662064
php_info_print_table_row(2, "Cache current operations", digits);
2067-
20682065
vips_snprintf(digits, 256, "%d", vips_cache_get_max_files());
20692066
php_info_print_table_row(2, "Cache max open files", digits);
20702067

2068+
vips_snprintf(digits, 256, "%d", vips_tracked_get_allocs());
2069+
php_info_print_table_row(2, "Memory allocations", digits);
2070+
vips_snprintf(digits, 256, "%zd", vips_tracked_get_mem());
2071+
php_info_print_table_row(2, "Memory currently allocated", digits);
2072+
vips_snprintf(digits, 256, "%zd", vips_tracked_get_mem_highwater());
2073+
php_info_print_table_row(2, "Memory high water", digits);
2074+
20712075
vips_snprintf(digits, 256, "%d", vips_concurrency_get());
20722076
php_info_print_table_row(2, "Concurrency", digits);
20732077

0 commit comments

Comments
 (0)