-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
98 lines (89 loc) · 3.57 KB
/
index.html
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="en">
<head>
<link href="src/index.css" type="text/css" rel="stylesheet" />
<title>Localforage bench ---</title>
</head>
<body>
<div class="container content" id="main-content">
<article>
<h1>Localforage benchmark</h1>
<h2>Test cases : </h2>
<ul>
<li>One instance : <br> The (given) key cointains a single object of two properties :
<ul>
<li>
value : { the received data }
</li>
<li> meta : { lastModification : timeStamp }</li>
</ul>
</li>
<li>Two instances :
<ul>
1st instance :
<li>
value : { the received data }
</li>
2nd instance :
<li> meta : { lastModification : timeStamp }</li>
</ul>
</li>
<p>Note 1 : do not forget to load the test file first !<br> Note 2 : After each write test, you can check the storage !
</p>
<table>
<tr>
<th> <button class="button" type="button" id="loadData">Load test file</button></th>
<th> <button class="button" type="button" id="runAllTests">Run all tests</button></th>
</tr>
<tr>
<th> <button class="button" type="button" id="runWriteTest">Run write tests</button></th>
<th> <button class="button" type="button" id="runReadTest">Run read tests</button></th>
</tr>
<tr>
<th> <button class="button" type="button" id="runWriteTestWithEnc">Run write tests (with enc.)</button></th>
<th> <button class="button" type="button" id="runReadTestWithEnc">Run read tests (with dec.)</button></th>
</tr>
</table>
<h2>Results</h2>
<ul>
Write
<li>
<div id="oneInstanceResultsWrite"></div>
</li>
<li>
<div id="twoInstancesResultsWrite"></div>
</li>
</ul>
<ul>
Read
<li>
<div id="oneInstanceResultsRead"></div>
</li>
<li>
<div id="twoInstancesResultsRead"></div>
</li>
</ul>
<ul>
Write (with enc)
<li>
<div id="oneInstanceResultsWriteWithEnc"></div>
</li>
<li>
<div id="twoInstancesResultsWriteWithEnc"></div>
</li>
</ul>
<ul>
Read (with dec)
<li>
<div id="oneInstanceResultsReadWithEnc"></div>
</li>
<li>
<div id="twoInstancesResultsReadWithEnc"></div>
</li>
</ul>
<!-- <p>The read operation with one instance requires one setItem and one entire ooperation instead of 2. </p> -->
</article>
</div>
<script src="dist/bundle.js"></script>
</body>
</html>