[Server] Support reporting flush time in psp
Summary:
Adding support to get initial total response size from libevent
and measure the time for initial flushing. Keep the data in transport
and add an extension call to allow php to get the data in psp phase.
Test Plan:
make fast_tests
<?php
function psp_func() {
$stats = fb_get_flush_stat();
error_log('Total bytes in response: ' . $stats['total']);
error_log('Sent: ' . $stats['sent']);
error_log('Time in us: '. $stats['time']);
}
function test() {
register_postsend_function('psp_func');
echo "register done";
echo "send send";
}
test();
DiffCamp Revision: 185194
Reviewed By: hzhao
CC: ps, hzhao, macvicar, qigao, hphp-diffs@lists
Tasks:
#440068: export http flush times in hphp
Revert Plan:
OK