php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54244 APC RFC1867 - 'rate' computed when upload finished
Submitted: 2011-03-13 19:54 UTC Modified: 2011-12-05 21:51 UTC
Votes:2
Avg. Score:3.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: jbondc at openmv dot com Assigned: frozenfire (profile)
Status: Closed Package: Documentation problem
PHP Version: trunk-SVN-2011-03-13 (SVN) OS: Any
Private report: No CVE-ID: None
 [2011-03-13 19:54 UTC] 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;
}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-05 21:51 UTC] 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-12-05 21:51 UTC] frozenfire@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: frozenfire
 [2011-12-05 21:51 UTC] frozenfire@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 11:01:31 2024 UTC