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
#!/bin/sh | |
FILE=./x86_64-linux/sqlite3.o | |
objcopy --redefine-sym _pthread_mutex_trylock=pthread_mutex_trylock $FILE | |
objcopy --redefine-sym _pthread_mutex_destroy=pthread_mutex_destroy $FILE | |
objcopy --redefine-sym _pthread_create=pthread_create $FILE | |
objcopy --redefine-sym _pthread_mutexattr_init=pthread_mutexattr_init $FILE | |
objcopy --redefine-sym _pthread_mutexattr_settype=pthread_mutexattr_settype $FILE | |
objcopy --redefine-sym _pthread_mutex_init=pthread_mutex_init $FILE | |
objcopy --redefine-sym _pthread_mutexattr_destroy=pthread_mutexattr_destroy $FILE |
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
#!/usr/bin/bash | |
# Do the same as TechEmpower test, but from console - for smoke testing | |
# CORES2USE is cores, used by wrk, CORES2USE_COUNT should be equal to used cores count | |
# recommented method to run is. | |
# ./tfb-smoke.sh "server_config_namee" | tee -a results.txt | |
CORES2USE=6-11 | |
CORES2USE_COUNT=6 | |
# wrk connections count. TFB uses up to 512 | |
CONN="-c 128" | |
HOST="http://localhost:8080" |
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
# This script emulate TechEmpower load during VERIFY stage | |
# All commands MUST ends in 20sec, otherwise verification is fail | |
# Expectation: | |
# - SIEGE 4.0.4 (https://www.joedog.org/siege-home/) to be installed; On Ubuntu: `sudo apt install siege` | |
# - `tfb-server` can be resolved (added to /etc/hosts for example) | |
# - .siegerc can be downloaded here - https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/toolset/databases/.siegerc | |
# Real value is 20s, if your host is fast - set lower value, 3s is ok for Ryzen5 5600 | |
TIMEOUT="3s" | |
err_report() { |
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
// node visualize_tfb_res.js | |
// expect results.json to be in the same folder | |
const fs = require('fs') | |
const res = require('./results.json') | |
const tests = Object.keys(res.rawData).filter(tc => !tc.endsWith('Counts')) | |
const tf = {} | |
const t = {} | |
for (const tc of tests) { | |
tf[tc] = {} | |
t[tc] = {} |
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
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int readbtime() { | |
FILE *fp; | |
char *line = NULL; | |
size_t len = 0; | |
ssize_t read; |
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
program httpThreadAV; | |
{$I Synopse.inc} | |
uses | |
Windows, | |
Classes, | |
SynCommons, | |
SynCrtSock, | |
SynLog; |
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
program SynDBOarAV; | |
{$I Synopse.inc} // without Synopse.inc strange compiler error on line FHttpServer.OnRequest := DoOnRequest | |
{$define USESYN} | |
uses | |
{.$I SynDprUses.inc} // with SynDprUses AV exists | |
// cmem, // with cmem AV exists | |
cthreads, | |
SynCrtSock, |