* fixing pad theme name

This commit is contained in:
shockrah 2021-10-17 16:40:19 -07:00
parent f4da9117a6
commit 59ec865da6
2 changed files with 44 additions and 1 deletions

View File

@ -3,7 +3,7 @@ languageCode = 'en-us'
title = 'What is Clippable' title = 'What is Clippable'
description = "A self hostable solution to clip sharing" description = "A self hostable solution to clip sharing"
theme = "dimension-hugo" theme = "dimension"
[params] [params]
author = "shockrah" author = "shockrah"

43
scripts/benchmark.py Normal file
View File

@ -0,0 +1,43 @@
import json
import subprocess
'''
{
'transactions': 3564,
'availability': 100.0,
'elapsed_time': 4.38,
'data_transferred': 7.1,
'response_time': 0.08,
'transaction_rate': 813.7,
'throughput': 1.62,
'concurrency': 61.21,
'successful_transactions': 3564,
'failed_transactions': 0,
'longest_transaction': 3.28,
'shortest_transaction': 0.0
}
'''
def color(text: str, color: str):
text = text.lower()
colors = {
'red': '\e[0;31m',
'blue': '\e[0;34m',
'green': '\e[0;32m'
}
nc = '\e[0m'
if text not in colors:
return text
else:
return colors[color] + text + nc
if __name__ == '__main__':
print('Starting')
proc = subprocess.run(
'siege -q -t 5S -c 200 http://localhost/'.split(),
text=True,
capture_output=True
)
result = json.loads(proc.stdout)
print(json.dumps(result,indent=2))