Commit 259fd2a6 authored by Florian Fischer's avatar Florian Fischer
Browse files

move source code to src/

parent f7e5eef5
build/*
results/*
*.png
__pycache__/*
*/__pycache__/*
.gdb_history
*.save
*.data
......
......@@ -2,9 +2,10 @@
.DEFAULT_GOAL = all
SRCDIR=benchmarks
BENCH_C_SOURCES = $(shell find $(SRCDIR) -name "*.c")
BENCH_CC_SOURCES = $(shell find $(SRCDIR) -name "*.cc")
SRCDIR=src/
BENCHSRCDIR=$(SRCDIR)/benchmarks
BENCH_C_SOURCES = $(shell find $(BENCHSRCDIR) -name "*.c")
BENCH_CC_SOURCES = $(shell find $(BENCHSRCDIR) -name "*.cc")
OBJDIR = ./build
......@@ -34,13 +35,13 @@ NOTC_TARGETS = $(BENCH_TARGETS:=-glibc-notc)
all: $(BENCH_TARGETS) $(NOTC_TARGETS) $(OBJDIR)/chattymalloc.so $(OBJDIR)/print_status_on_exit.so
$(OBJDIR)/print_status_on_exit.so: print_status_on_exit.c $(MAKEFILE_LIST)
$(OBJDIR)/print_status_on_exit.so: $(SRCDIR)/print_status_on_exit.c $(MAKEFILE_LIST)
$(CC) -shared $(CFLAGS) -o $@ $< -ldl
$(OBJDIR)/chattymalloc.so: chattymalloc.c $(MAKEFILE_LIST)
$(OBJDIR)/chattymalloc.so: $(SRCDIR)/chattymalloc.c $(MAKEFILE_LIST)
$(CC) -shared $(CFLAGS) -o $@ $< -ldl
$(OBJDIR)/trace_run: trace_run.c $(MAKEFILE_LIST)
$(OBJDIR)/trace_run: $(SRCDIR)/trace_run.c $(MAKEFILE_LIST)
$(CC) -pthread $(CFLAGS) -o $@ $<
$(OBJDIR)/trace_run-glibc-notc: $(OBJDIR)/trace_run $(MAKEFILE_LIST)
......
#!/usr/bin/env python3
import argparse
import importlib
import os
import common_targets
from falsesharing import falsesharing
from loop import loop
from mysql import mysql
from dj_trace import dj_trace
from larson import larson
benchmarks = [loop, mysql, falsesharing, dj_trace, larson]
benchmarks = ["loop", "mysql", "falsesharing", "dj_trace", "larson"]
parser = argparse.ArgumentParser(description="benchmark memory allocators")
parser.add_argument("-s", "--save", help="save benchmark results to disk", action='store_true')
......@@ -32,6 +25,7 @@ def main():
os.makedirs(args.summarydir)
for bench in benchmarks:
bench = eval("importlib.import_module('src.{0}').{0}".format(bench))
if args.benchmarks and not bench.name in args.benchmarks:
continue
if args.load:
......
import multiprocessing
import re
from benchmark import Benchmark
from src.benchmark import Benchmark
throughput_re = re.compile("^Throughput =\s*(?P<throughput>\d+) operations per second.$")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment