mirror of https://github.com/ledisdb/ledisdb.git
update benchmark
This commit is contained in:
parent
978a7dcd35
commit
959e8d1205
201
index.html
201
index.html
|
@ -107,87 +107,12 @@ db.Get(key)
|
||||||
<!-- /benchmark-->
|
<!-- /benchmark-->
|
||||||
<div class="row benchmark" id="benchmark">
|
<div class="row benchmark" id="benchmark">
|
||||||
<h2>Benchmark</h2>
|
<h2>Benchmark</h2>
|
||||||
|
|
||||||
|
<div id="container" style="width: 1150px; height: 400px; margin: 0 0 20px 0 "></div>
|
||||||
|
<div id="container_ledis" style="width: 1150px; height: 400px; margin: 0 auto"></div>
|
||||||
|
|
||||||
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
|
|
||||||
|
|
||||||
<table class="hide" id="datatable">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th></th>
|
|
||||||
<th>Redis</th>
|
|
||||||
<th>SSDB</th>
|
|
||||||
<th>LedisDB</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>SET</th>
|
|
||||||
<td>42735.04</td>
|
|
||||||
<td>35971.22</td>
|
|
||||||
<td>38759.69</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>GET</th>
|
|
||||||
<td>45871.56</td>
|
|
||||||
<td>47393.37</td>
|
|
||||||
<td>40160.64</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>INCR</th>
|
|
||||||
<td>45248.87</td>
|
|
||||||
<td>36630.04</td>
|
|
||||||
<td>36101.08</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>LPUSH</th>
|
|
||||||
<td>45045.04</td>
|
|
||||||
<td>37174.72</td>
|
|
||||||
<td>33003.30</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>LPOP</th>
|
|
||||||
<td>43103.45</td>
|
|
||||||
<td>38167.94</td>
|
|
||||||
<td>27624.31</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>LPUSH-lrange</th>
|
|
||||||
<td>44843.05</td>
|
|
||||||
<td>37593.98</td>
|
|
||||||
<td>32894.74</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>LRANGE_100</th>
|
|
||||||
<td>14727.54</td>
|
|
||||||
<td>905.55</td>
|
|
||||||
<td>7352.94</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>LRANGE_300</th>
|
|
||||||
<td>6915.63</td>
|
|
||||||
<td>327.78</td>
|
|
||||||
<td>2867.79</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>LRANGE_500</th>
|
|
||||||
<td>5042.86</td>
|
|
||||||
<td>222.36</td>
|
|
||||||
<td>1778.41</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>LRANGE_600</th>
|
|
||||||
<td>3960.40</td>
|
|
||||||
<td>165.30</td>
|
|
||||||
<td>1590.33</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>MSET</th>
|
|
||||||
<td>33003.30</td>
|
|
||||||
<td>33112.59</td>
|
|
||||||
<td>21881.84</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br>
|
<br>
|
||||||
<p>For more information, please take a look at <a href="https://github.com/siddontang/ledisdb/wiki/Benchmark"><em>benchmark.md</em></a>.</p>
|
<p>For more information, please take a look at <a href="https://github.com/siddontang/ledisdb/wiki/Benchmark"><em>benchmark.md</em></a>.</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -230,35 +155,97 @@ db.Get(key)
|
||||||
<script src="http://code.highcharts.com/highcharts.js"></script>
|
<script src="http://code.highcharts.com/highcharts.js"></script>
|
||||||
<script src="http://code.highcharts.com/modules/data.js"></script>
|
<script src="http://code.highcharts.com/modules/data.js"></script>
|
||||||
<script src="http://code.highcharts.com/modules/exporting.js"></script>
|
<script src="http://code.highcharts.com/modules/exporting.js"></script>
|
||||||
<script>
|
|
||||||
$(function () {
|
<script type="text/javascript">
|
||||||
Highcharts.setOptions({
|
$(document).ready(function() {
|
||||||
colors: ['#df4810', '#3d4c4e', '#45a797']
|
|
||||||
});
|
|
||||||
$('#container').highcharts({
|
var options = {
|
||||||
data: {
|
chart: {
|
||||||
table: document.getElementById('datatable')
|
renderTo: 'container',
|
||||||
},
|
type: 'column'
|
||||||
chart: {
|
},
|
||||||
type: 'column'
|
title: {
|
||||||
},
|
text: 'Redis-Benchmark'
|
||||||
title: {
|
},
|
||||||
text: 'Redis vs SSDB vs LedisDB'
|
xAxis: {
|
||||||
},
|
categories: []
|
||||||
yAxis: {
|
},
|
||||||
allowDecimals: false,
|
yAxis: {
|
||||||
title: {
|
title: {
|
||||||
text: 'Units'
|
text: 'Requests'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tooltip: {
|
series: [],
|
||||||
formatter: function() {
|
colors: ['#df4810', '#3d4c4e', '#45a797', "#89C4F4", "#fddd67", "#5fa727"]
|
||||||
return '<b>'+ this.series.name +'</b><br/>'+
|
};
|
||||||
this.point.y +' '+ this.point.name.toLowerCase();
|
|
||||||
}
|
var options_ledis = {
|
||||||
}
|
chart: {
|
||||||
|
renderTo: 'container_ledis',
|
||||||
|
type: 'column'
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
text: 'Ledis-Benchmark'
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
categories: []
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
title: {
|
||||||
|
text: 'Requests'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series: [],
|
||||||
|
colors: ['#df4810', '#3d4c4e', '#45a797', "#89C4F4", "#fddd67", "#5fa727"]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
$.get('redis.csv', function (data) {
|
||||||
|
parse(data, options);
|
||||||
|
});
|
||||||
|
|
||||||
|
$.get('ledis.csv', function (data){
|
||||||
|
parse(data, options_ledis)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
function parse(data, options) {
|
||||||
|
// Split the lines
|
||||||
|
var lines = data.split('\n');
|
||||||
|
$.each(lines, function(lineNo, line) {
|
||||||
|
var items = line.split(',');
|
||||||
|
|
||||||
|
// header line containes categories
|
||||||
|
if (lineNo == 0) {
|
||||||
|
$.each(items, function(itemNo, item) {
|
||||||
|
if (itemNo > 0) options.xAxis.categories.push(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// the rest of the lines contain data with their name in the first position
|
||||||
|
// #HACKS: lineNo < 7. The csv file contains empty line. Ignore the 7th line.
|
||||||
|
else if (lineNo < 7) {
|
||||||
|
var series = {
|
||||||
|
data: []
|
||||||
|
};
|
||||||
|
$.each(items, function(itemNo, item) {
|
||||||
|
if (itemNo == 0) {
|
||||||
|
series.name = item;
|
||||||
|
} else{
|
||||||
|
series.data.push(parseFloat(item));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
options.series.push(series);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var chart = new Highcharts.Chart(options);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
DB,SET,INCR,GET,RPUSH,LRANGE_10,LRANGE_50,LRANGE_100,LPOP,HSET,HGET,HINCRBY,HDEL,ZADD,ZINCRBY,ZRANGE,ZRANGEBYSCORE,ZREVRANGE,ZREVRANGEBYSCORE,ZREM
|
||||||
|
redis,27012.73,34305.81,31517.71,30526.88,29262.62,19338.99,11744.58,31329.47,28329.03,27937.09,30105.63,28547.79,29335.08,27166.90,31169.20,24487.11,28239.99,28556.51,30771.39
|
||||||
|
ssdb,23921.63,23618.85,24696.15,25596.02,7171.08,1762.47,1002.22,25992.80,26805.23,23396.95,25858.99,25756.50,26697.49,20424.08,6129.14,5979.09,256.82,229.75,25855.00
|
||||||
|
ledisdb_goleveldb,25429.22,24246.74,27537.03,23023.43,17994.29,8379.71,4911.44,22619.82,24508.36,25552.39,22600.28,21110.74,18951.49,21061.80,671.16,632.90,59.08,20.38,22026.00
|
||||||
|
ledisdb_leveldb,24077.37,24395.03,21779.10,22922.70,17567.00,8601.56,5115.64,22971.71,24242.79,26686.95,22310.29,22090.89,21119.30,21736.81,3222.83,3180.91,118.70,44.19,21997.11
|
||||||
|
ledisdb_rocksdb,25269.10,24289.25,27176.58,23541.83,18287.84,8381.75,5082.11,21977.15,24360.25,28050.94,23032.09,21171.07,19556.10,21915.17,5386.90,5199.97,127.89,115.12,21335.86
|
||||||
|
ledisdb_lmdb,23987.90,24791.43,25447.90,23869.03,17630.86,8507.26,5115.74,22000.95,23354.64,27072.38,24027.73,23240.89,21555.89,23618.73,25097.35,25103.04,24617.92,23822.57,23467.32
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
DB,GET,SET,INCR,LPUSH,LPOP,LPUSH,LRANGE_100,LRANGE_300,LRANGE_500,LRANGE_600,MSET
|
||||||
|
redis,35790.98,38080.73,37341.30,30469.22,30138.64,33852.40,13123.36,6421.78,5177.06,4052.52,25680.53
|
||||||
|
ssdb,28490.03,28264.55,27639.58,29342.72,27624.31,28851.70,935.94,356.72,244.56,181.29,20449.90
|
||||||
|
ledisdb_goleveldb,27307.48,29797.38,26867.28,22441.65,23212.63,24618.42,6460.78,2608.24,1881.54,1318.25,14351.32
|
||||||
|
ledisdb_leveldb,27442.37,22094.56,18982.54,22624.43,20807.32,25601.64,7850.53,3296.20,2390.86,1849.25,19936.21
|
||||||
|
ledisdb_rocksdb,26638.25,30102.35,25113.01,19833.40,20424.84,21294.72,7336.76,2961.73,2227.87,1767.60,19455.25
|
||||||
|
ledisdb_lmdb,26852.85,29761.91,27027.03,26096.03,24084.78,24875.62,7399.73,3150.60,2514.84,1892.22,20764.12
|
|
Loading…
Reference in New Issue