From 4a8dcf8d035a8a0b0abf40a64b23f1900b42a98f Mon Sep 17 00:00:00 2001
From: Florian Fischer <florian.fischer@muhq.space>
Date: Fri, 13 May 2022 17:28:58 +0200
Subject: [PATCH] fetch emper repo before building client and build with
 stats_all

---
 bench/emper.py | 7 +++++--
 eval.py        | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/bench/emper.py b/bench/emper.py
index 3b86399..75a6d82 100644
--- a/bench/emper.py
+++ b/bench/emper.py
@@ -696,7 +696,8 @@ def build_emper(emper_dir, meson_options='', build_env=None):
     build_env.update({'CFLAGS': '-g', 'CXXFLAGS': '-g'})
     meson_env = prepare_env(build_env)
 
-    common_options = '-Dstats=true --buildtype=release --fatal-meson-warnings'
+    stats_options = '-Dstats=true -Dstats_all=true -Dstats_stack_usage=disabled'
+    common_options = f'{stats_options} --buildtype=release --fatal-meson-warnings'
     build_cmd = f'meson build {common_options} {meson_options}'
 
     cmd_run(build_cmd, log, cwd=emper_dir, env=meson_env)
@@ -711,8 +712,10 @@ def get_commit_id(repo=REPO, commit_ish='HEAD') -> str:
     return subprocess.check_output(cmd.split(), cwd=repo, text=True)[:-1]
 
 
-def prepare_client(data_dir: Path):
+def prepare_client(data_dir: Path, fetch=True):
     """Prepare and build the special emper variant for the client"""
+    if fetch:
+        repo_fetch()
     client_checkout = get_commit_id(REPO, CLIENT_CHECKOUT)
 
     with open(data_dir / 'desc.yml', 'a', encoding='utf-8') as desc_file:
diff --git a/eval.py b/eval.py
index cb32023..f4dea7f 100755
--- a/eval.py
+++ b/eval.py
@@ -420,7 +420,7 @@ if __name__ == '__main__':
     write_desc(DATA_DIR)
 
     if args.client_impl == 'emper':
-        emper.prepare_client(DATA_DIR)
+        emper.prepare_client(DATA_DIR, fetch=not args.no_fetch)
 
     # generate selected emper flavors
     if 'emper' in args.implementations:
-- 
GitLab