-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathkv-shmop.inc
More file actions
38 lines (31 loc) · 885 Bytes
/
kv-shmop.inc
File metadata and controls
38 lines (31 loc) · 885 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
<?php
/**
* php safe options - only tests array/class interfaces
* Php 5.0+
*/
/** ---------------------------------- Tests functions -------------------------------------------- */
// ------------------------- INTL tests -----------------------
/**
* @since 5.0
*/
function test_39_04_kvstorage_shmop()
{
global $testsLoopLimits, $totalOps, $emptyResult;
if (!is_file('kvstorage-shmop.inc')){
return $emptyResult;
}
include_once('kvstorage-shmop.inc');
if (!$kvstorage->available){
return $emptyResult;
}
$count = $testsLoopLimits['39_04_kvstorage_shmop'];
$time_start = get_microtime();
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());
}