feox-server 0.7.0

High-performance Redis-compatible server for Feox DB
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::sync::atomic::{AtomicU64, Ordering};

static KEY_COUNTER: AtomicU64 = AtomicU64::new(0);

pub fn unique_key(prefix: &str) -> String {
    let counter = KEY_COUNTER.fetch_add(1, Ordering::SeqCst);
    format!("{}_{}", prefix, counter)
}

#[allow(dead_code)]
pub fn test_value(size: usize) -> String {
    "x".repeat(size)
}