feat: use micro seconds for logs capture (BREAKING)

This commit is contained in:
Matthieu Bessat 2024-07-28 19:34:04 +02:00
parent 3e2ec661a1
commit 3384228e61
5 changed files with 12 additions and 8 deletions

View file

@ -4,7 +4,7 @@ import string
from time import sleep
def main():
iterations = random.randint(10, 150)
iterations = random.randint(15, int(os.getenv("SIMULATION_MAX_ITERATIONS") or 100))
speed = float(os.getenv("SIMULATION_SPEED") or 0.8)
print(f"Going for {iterations=} with {speed=}")
for i in range(iterations):
@ -20,7 +20,7 @@ def main():
)
)
sleep(
speed * (0.02 * random.expovariate(0.5) +
(1/speed) * (0.02 * random.expovariate(0.5) +
(random.uniform(0, 1) if random.uniform(0, 1) > 0.8 else 0) +
(random.uniform(0, 5) if random.uniform(0, 1) > 0.99 else 0))
)