mirror of
https://github.com/php-win-ext/phpy.git
synced 2026-03-24 17:02:15 +01:00
17 lines
283 B
Python
17 lines
283 B
Python
import phpy
|
|
import random
|
|
from php import std
|
|
|
|
m1 = phpy.call('memory_get_usage')
|
|
c = 128
|
|
total = 0
|
|
for i in range(1, c):
|
|
s = phpy.call('random_bytes', 8192 * i)
|
|
assert s.len() == 8192 * i
|
|
total += s.len()
|
|
|
|
m2 = phpy.call('memory_get_usage')
|
|
print(m2 - m1)
|
|
print(total)
|
|
|