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 json | |
import time | |
import uuid | |
import logging | |
import requests | |
class Connector: | |
def __init__(self, host, token, expires): | |
self.host = host |
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
disk | writes | reads | data | overhead | total | duration | |
---|---|---|---|---|---|---|---|
HDD | 500M | 0M | 3G | 12G | 15G | 14m56s | |
HDD | 500M | 7.7M | 3G | 12G | 15G | 43m47s | |
SSD | 500M | 0M | 3G | 11G | 14G | 11m55s | |
SSD | 500M | 5.6M | 3G | 11G | 14G | 19m52 |
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
public static void Main(string[] args) | |
{ | |
long counter = 0; | |
Random randomizer = new Random(); | |
DataDictionary dictionary = new DataDictionary(); | |
for (int i = 0; i < 500000000; i++) | |
{ | |
int reads = randomizer.Next(0, 10000000); | |
byte[] key = new byte[randomizer.Next(4, 4)]; |
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
public class InFile | |
{ | |
public ValueBuilder Builder(); | |
} | |
public class ValueBuilder | |
{ | |
public bool IsEmpty(); | |
public int Insert(byte[] data); | |
public ValueFile Flush(); |
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
public class InMemory | |
{ | |
public KeyBlock Keys(); | |
public ValueBlock Values(); | |
} | |
public class KeyBlock | |
{ | |
public int Insert(byte[] data); | |
public int Hash(KeyReference reference, DataHasher hasher); |
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
public struct DataReference | |
{ | |
public short Block; | |
public int Offset; | |
public byte KeyLength; | |
public ushort ValueLength; | |
} | |
public struct DataNode | |
{ |
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
Show hidden characters
{ | |
"image": "mcr.microsoft.com/vscode/devcontainers/dotnet:5.0", | |
"extensions": ["ms-dotnettools.csharp"] | |
} |
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
from time import sleep | |
from boto3 import client | |
from botocore.config import Config | |
config = Config( | |
retries = { | |
'max_attempts': 10, | |
'mode': 'adaptive' | |
} | |
) |
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
296089294 function calls (290809304 primitive calls) in 832.918 seconds | |
Ordered by: internal time | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
19706 74.185 0.004 289.294 0.015 json.py:45(process) | |
68618779/68617586 60.549 0.000 60.586 0.000 {built-in method builtins.len} | |
16765202 56.732 0.000 101.660 0.000 pipes.py:52(read) | |
554796 50.969 0.000 50.969 0.000 {method 'read' of '_ssl._SSLSocket' objects} | |
560857 49.093 0.000 49.093 0.000 {method 'write' of '_ssl._SSLSocket' objects} |
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
294808988 function calls (289527877 primitive calls) in 1308.849 seconds | |
Ordered by: internal time | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
560862 780.566 0.001 780.566 0.001 {method 'write' of '_ssl._SSLSocket' objects} | |
423504 260.731 0.001 260.731 0.001 {method 'read' of '_ssl._SSLSocket' objects} | |
11175660 39.737 0.000 39.737 0.000 {orjson.loads} | |
19706 27.423 0.001 113.160 0.006 json.py:45(process) | |
93 18.475 0.199 18.475 0.199 {method 'connect' of '_socket.socket' objects} |
NewerOlder