-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathkv-apcu.inc
More file actions
44 lines (36 loc) · 968 Bytes
/
kv-apcu.inc
File metadata and controls
44 lines (36 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* php safe options - only tests array/class interfaces
* Php 5.0+
*/
/** ---------------------------------- Tests functions -------------------------------------------- */
// ------------------------- INTL tests -----------------------
/**
* @since 5.0
*/
function test_39_03_kvstorage_apcu()
{
global $testsLoopLimits, $totalOps, $emptyResult;
global $debugMode;
if (!is_file('kvstorage-apcu.inc')){
return $emptyResult;
}
include_once('kvstorage-apcu.inc');
if (!$kvstorage->available){
return $emptyResult;
}
$count = $testsLoopLimits['39_03_kvstorage_apcu'];
$time_start = get_microtime();
if ($debugMode) {
var_dump($count);
var_dump($kvstorage);
}
for ($i = 0; $i < $count; $i++) {
$num = number_format($i / 100., 2, '.', '');
$kvstorage->set($i, $num);
$v=$kvstorage->get($i);
$kvstorage->del($i);
}
$totalOps += $count;
return format_result_test(get_microtime() - $time_start, $count, mymemory_usage());
}