import requests
import json
import os
import time

def f(n):
    payload = {
        'title': "title",
        'lang': "rust",
        'content': "// content",
        'expiration': n
    }

    json.dump(payload,open('post.txt','w'))
    url = "http://localhost:8088/record"


    bench = f'ab -n 13000 -c 100 -p post.txt -T "application/json" {url}'
    print(bench)
    os.system(bench)

for i in range(20,10,-1):
    f(i)

for i in range(20,0,-1):
    time.sleep(1)
    print(f'wait {i} s')

os.system('cat server.log | rg "CLEAN " && tail server.log')


112378471f07c4eec5fb587d15247d16d65aa75d
<mask token>

<mask token>


def f(n):
    payload = {'title': 'title', 'lang': 'rust', 'content': '// content',
        'expiration': n}
    json.dump(payload, open('post.txt', 'w'))
    url = 'http://localhost:8088/record'
    bench = f'ab -n 13000 -c 100 -p post.txt -T "application/json" {url}'
    print(bench)
    os.system(bench)


<mask token>

<mask token>


def f(n):
    payload = {'title': 'title', 'lang': 'rust', 'content': '// content',
        'expiration': n}
    json.dump(payload, open('post.txt', 'w'))
    url = 'http://localhost:8088/record'
    bench = f'ab -n 13000 -c 100 -p post.txt -T "application/json" {url}'
    print(bench)
    os.system(bench)


for i in range(20, 10, -1):
    f(i)
for i in range(20, 0, -1):
    time.sleep(1)
    print(f'wait {i} s')
os.system('cat server.log | rg "CLEAN " && tail server.log')

import requests
import json
import os
import time


def f(n):
    payload = {'title': 'title', 'lang': 'rust', 'content': '// content',
        'expiration': n}
    json.dump(payload, open('post.txt', 'w'))
    url = 'http://localhost:8088/record'
    bench = f'ab -n 13000 -c 100 -p post.txt -T "application/json" {url}'
    print(bench)
    os.system(bench)


for i in range(20, 10, -1):
    f(i)
for i in range(20, 0, -1):
    time.sleep(1)
    print(f'wait {i} s')
os.system('cat server.log | rg "CLEAN " && tail server.log')

import requests
import json
import os
import time

def f(n):
    payload = {
        'title': "title",
        'lang': "rust",
        'content': "// content",
        'expiration': n
    }

    json.dump(payload,open('post.txt','w'))
    url = "http://localhost:8088/record"


    bench = f'ab -n 13000 -c 100 -p post.txt -T "application/json" {url}'
    print(bench)
    os.system(bench)

for i in range(20,10,-1):
    f(i)

for i in range(20,0,-1):
    time.sleep(1)
    print(f'wait {i} s')

os.system('cat server.log | rg "CLEAN " && tail server.log')

