This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Memory | |
- Limit: | |
○ On a ns: used to calculate available resource: avail = limit - used | |
○ Sum(pod limit) must be less than the ns limit quota | |
○ Special behavior: On a pod without ns: kill it if exceed | |
- Request: | |
○ On a ns: used to control how much can be requested | |
○ Sum(pod request) must be less than the ns request quota | |
○ Special behavior: When ns request exists, pod request missing, pod request falls back to pod limit | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import redis.clients.jedis.Jedis; | |
public class RedisBenchmark { | |
public static void main(String[] args) { | |
Jedis jedis = new Jedis("127.0.0.1", 6379); | |
//warm up | |
for (int i = 0; i < 1000; i++) | |
jedis.set("a", "1"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(rbtree). | |
-export([insert/3, find/2]). | |
% Node structure: { Key, Value, Color, Smaller, Bigger } | |
find(_, nil) -> | |
not_found; | |
find(Key, { Key, Value, _, _, _ }) -> | |
{ found, { Key, Value } }; |