Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/KernelMaker/rocksutil
A c++ develop toolkit
https://github.com/KernelMaker/rocksutil
rocksdb toolkit
Last synced: 21 days ago
JSON representation
A c++ develop toolkit
- Host: GitHub
- URL: https://github.com/KernelMaker/rocksutil
- Owner: KernelMaker
- Created: 2017-05-11T12:02:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-22T09:13:10.000Z (about 7 years ago)
- Last Synced: 2024-08-05T17:24:57.706Z (4 months ago)
- Topics: rocksdb, toolkit
- Language: C++
- Homepage:
- Size: 155 KB
- Stars: 33
- Watchers: 5
- Forks: 52
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-hacking-lists - KernelMaker/rocksutil - A c++ develop toolkit (C++)
README
# rocksutil
rocksutil is a ToolKit for C++ developer,It has a lot of useful tools to make coding more faster and easier. It supports LINUX and MACOS platforms## tools
### 1. Env
Easy way to operate files, directories, threads, times, etc
Here is an [EXAMPLE](https://github.com/KernelMaker/rocksutil/blob/master/examples/thread_pool_example.cc)
Find more usages [Here](https://github.com/KernelMaker/rocksutil/blob/master/include/rocksutil/env.h)
|Files & Directories |
| --- |
|Env::NewDirectory |
|Env::FileExists |
|Env::GetChildren |
|Env::GetChildrenFileAttributes|
|Env::DeleteFile |
|Env::CreateDir |
|Env::CreateDirIfMissing |
|Env::GetFileSize |
|Env::GetFileModificationTime |
|Env::RenameFile |
|Env::LinkFile |
|Env::LockFile |
|Env::UnlockFile |
|Env::GetAbsolutePath |---
|Thread & ThreadPool |
| --- |
|Env::Schedule |
|Env::UnSchedule |
|Env::StartThread |
|Env::WaitForJoin |
|Env::GetThreadPoolQueueLen |
|Env::SetBackgroundThreads |
|Env::IncBackgroundThreadsIfNeeded|
|Env::LowerThreadPoolIOPriority |
|Env::GetThreadID |---
|Time & System |
| --- |
|Env::NowMicros |
|Env::NowNanos |
|Env::SleepForMicroseconds|
|Env::GetHostName |
|Env::GetCurrentTime |### 2. Log
Easy way to use Log
Here is an [EXAMPLE](https://github.com/KernelMaker/rocksutil/blob/master/examples/log_example.cc)
### 3. ThreadLocal
Easy way to use thread-specific data
Here is an [EXAMPLE](https://github.com/KernelMaker/rocksutil/blob/master/examples/thread_pool_example.cc)
### 4. MutexLock
Easy way to use Lock, RWLock, SpinLock
Here is an [EXAMPLE](https://github.com/KernelMaker/rocksutil/blob/master/examples/mutexlock_example.cc)
### 5. LRUCache
Easy way to use lru cacheHere is an [EXAMPLE](https://github.com/KernelMaker/rocksutil/blob/master/examples/lru_cache_example.cc)
### 6. File Writer & Reader
Easy way to read & write file in random or sequential mode, and use EnvOptions to manipulate
the writer & reader to use [mmap, direct_io, buffer_read_write...]Here is an [EXAMPLE](https://github.com/KernelMaker/rocksutil/blob/master/examples/file_reader_writer_example.cc)
### 7. Write Ahead Log
Easy way to write or recover from a robust [format](https://github.com/KernelMaker/rocksutil/blob/master/util/log_format.h) wal, based on FileWriter & FileReader
Here is an [EXAMPLE](https://github.com/KernelMaker/rocksutil/blob/master/examples/wal_example.cc)
### 8. Others
Find more info in[Slice](https://github.com/KernelMaker/rocksutil/blob/master/include/rocksutil/slice.h)
[Coding](https://github.com/KernelMaker/rocksutil/blob/master/include/rocksutil/coding.h)
[Status](https://github.com/KernelMaker/rocksutil/blob/master/include/rocksutil/status.h)
[Hash](https://github.com/KernelMaker/rocksutil/blob/master/include/rocksutil/hash.h )
[CRC32](https://github.com/KernelMaker/rocksutil/blob/master/include/rocksutil/crc32c.h )
## Where is it from?
This ToolKit is mainly extracted from [rocksdb](https://github.com/facebook/rocksdb), I remove some specific features, change some and make it more
**UNIVERSAL**