Skip to content

Latest commit

 

History

History
105 lines (72 loc) · 3.39 KB

README.md

File metadata and controls

105 lines (72 loc) · 3.39 KB

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

Find more usages Here

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

3. ThreadLocal

Easy way to use thread-specific data

Here is an EXAMPLE

4. MutexLock

Easy way to use Lock, RWLock, SpinLock

Here is an EXAMPLE

5. LRUCache

Easy way to use lru cache

Here is an EXAMPLE

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

7. Write Ahead Log

Easy way to write or recover from a robust format wal, based on FileWriter & FileReader

Here is an EXAMPLE

8. Others

Find more info in

Slice

Coding

Status

Hash

CRC32

Where is it from?

This ToolKit is mainly extracted from rocksdb, I remove some specific features, change some and make it more UNIVERSAL