harbor run -t openthoughts/tasktrove-exp-rpt-issue-issue-4632harbor download openthoughts/tasktrove-exp-rpt-issue-issue-4632This task asks you to implement a small, self-contained Linux benchmark harness for a templated time_machine class. The harness should be implemented in a minimal set of files under /app/ and be entirely self-contained (no external dependencies beyond the C++ standard library). The deliverables described below should be created or modified in /app/.
What you will implement (high level)
A header-only, templated time_machine<K, Data> with:
A bench driver (bench.cpp) that:
An optional correctness checker (check.cpp)
A Makefile to build bench with g++ -std=c++17 -O2
A run_benchmark.sh script
bench.log
README
Before (pre-fix) state
The repository currently does not contain the self-contained harness. The following is a minimal, non-working placeholder set of files to illustrate the intended structure and what needs to be implemented in /app/.
Code blocks show the "before" state (likely non-functional placeholders) for the 3–4 key files.
// before: placeholder header (not a real time_machine)
#ifndef TIME_MACHINE_H
#define TIME_MACHINE_H
template<class K, class Data>
class time_machine {
public:
time_machine() {}
void enable(bool) {}
void step_forward(const K& key, Data& data) { /* TODO */ }
void save_state() { /* TODO */ }
void jump_back() { /* TODO */ }
};
#endif // TIME_MACHINE_H
#include "time_machine.h"
#include <iostream>
int main() {
// placeholder driver (not functional)
time_machine<int, double> tm;
// no real workload
return 0;
}
# placeholder makefile (non-functional)
all: bench
bench: bench.cpp
\tg++ -std=c++17 -O2 bench.cpp -o bench
#!/bin/sh
# placeholder scaffold
echo "Run a small benchmark grid (to implement)"
What to create/modify in /app/
How to run (intended usage)
Acceptance criteria
Notes