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