Doc #54244 [Opn->Csd]: APC RFC1867 - 'rate' computed when upload finished

From: Date: Mon, 05 Dec 2011 21:51:55 +0000
Subject: Doc #54244 [Opn->Csd]: APC RFC1867 - 'rate' computed when upload finished
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7587@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54244&edit=1 ID: 54244 Updated by: frozenfire@php.net Reported by: jbondc at openmv dot com Summary: APC RFC1867 - 'rate' computed when upload finished -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: Any PHP Version: trunk-SVN-2011-03-13 (SVN) -Assigned To: +Assigned To: frozenfire Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2011-12-05 21:51:37] frozenfire@php.net Automatic comment from SVN on behalf of frozenfire Revision: http://svn.php.net/viewvc/?view=revision&revision=320464 Log: Noted that the rate key of apc.rfc1867 is only available once all file transfers are completed. Closes bug #54244. ------------------------------------------------------------------------ [2011-03-13 19:54:37] jbondc at openmv dot com Description: ------------ http://www.php.net/manual/en/apc.configuration.php#ini.apc.rfc1867 The documentation should be updated to mention that $info['rate'] is only available when the upload of all files are completed. If a file is uploading and you are checking the status, the upload speed/rate needs to be computed manually. I thought I had an old or buggy version of apc but it's the current behavior and makes sense: http://svn.php.net/repository/pecl/apc/trunk/apc_rfc1867.c Test script: --------------- // Exampe to calculate the rate as the file is uploading $info = apc_fetch($key); if( !isset($info['rate']) ) { $ms = (microtime(true) - (float)$info['start_time']); if($ms > 0) $info['rate'] = $info['current'] / $ms; } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=54244&edit=1

« previous php.doc.bugs (#7587) next »