https://github.com/youngyangyang04/skiplist-cpp
A tiny KV storage based on skiplist written in C++ language| 使用C++开发,基于跳表实现的轻量级键值数据库🔥🔥 🚀
https://github.com/youngyangyang04/skiplist-cpp
Last synced: 8 months ago
JSON representation
A tiny KV storage based on skiplist written in C++ language| 使用C++开发,基于跳表实现的轻量级键值数据库🔥🔥 🚀
- Host: GitHub
- URL: https://github.com/youngyangyang04/skiplist-cpp
- Owner: youngyangyang04
- License: gpl-3.0
- Created: 2018-12-02T09:30:22.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-05T02:07:01.000Z (almost 2 years ago)
- Last Synced: 2025-05-15T06:07:42.314Z (8 months ago)
- Language: C++
- Homepage:
- Size: 82 KB
- Stars: 2,379
- Watchers: 12
- Forks: 537
- Open Issues: 15
-
Metadata Files:
- Readme: README-en.md
- License: LICENSE
Awesome Lists containing this project
README
# Skiplist-CPP
A tiny KV storage based on skiplist written in C++ language
# interface
* insertElement
* deleteElement
* searchElement
* displayList
* dumpFile
* loadFile
* size
# performance data
## insert
skiplist tree high:18
insert random key
|insert element num (w) | timecost (s) |
|---|---|
|10 |0.316763 |
|50 |1.86778 |
|100 |4.10648 |
qps: 24.39w
## get
|search element (w) |timecost (s) |skiplist size (w)|
|---|---| --- |
|10|0.47148 |10|
|50|2.56373 |50|
|100|5.43204 |100|
qps:18.41w
# code coverage report
gtest and lcov
[](file:///Users/sunxiuyang/Downloads/tmp/result/home/users/sunxiuyang/workspace/baidu/personal-code/sunxiuyang/index.html)
how to getcoverage report
```
lcov -d . -t 'skiplist_test' -o 'skiplist_test.info' -b . -c
genhtml -o result skiplist_test.info
```
# USAGE
Just include skiplist.h in your code
```
make // complie demo main.cpp
./bin/main // run
```
Test performance data
```
sh stress_test_start.sh
```
# Todo
* stress test is not auto
# License
This library is licensed under GPL-3.0 License. See LICENSE for details.