<commit_before>#include <iostream>
#include <memory>
#include <string>
#include "zmq.hpp"

#include "dsb/execution.hpp"

int main(int argc, const char** argv)
{
    if (argc < 2) {
        std::cerr << "Usage: " << argv[0] << " <address>\n"
                  << "  address = the DSB server endpoint (e.g. tcp://localhost:5432)"
                  << std::endl;
        return 0;
    }
    const auto endpoint = std::string(argv[1]);

    auto context = std::make_shared<zmq::context_t>();
    auto controller = dsb::execution::SpawnController(context, endpoint);

    std::cout << "Press ENTER to start simulation." << std::endl;
    std::cin.ignore();

    // Super advanced master algorithm.
    double time = 0.0;
    const double maxTime = 10.0;
    const double stepSize = 1.0/100.0;

    
    for (double time = 0.0; time < maxTime; time += stepSize) {
        controller.Step(time, stepSize);
    }
    controller.Terminate();
<commit_msg>Don't step beyond maxTime<commit_after>#include <iostream>
#include <memory>
#include <string>
#include "zmq.hpp"

#include "dsb/execution.hpp"


int main(int argc, const char** argv)
{
    if (argc < 2) {
        std::cerr << "Usage: " << argv[0] << " <address>\n"
                  << "  address = the DSB server endpoint (e.g. tcp://localhost:5432)"
                  << std::endl;
        return 0;
    }
    const auto endpoint = std::string(argv[1]);

    auto context = std::make_shared<zmq::context_t>();
    auto controller = dsb::execution::SpawnController(context, endpoint);

    std::cout << "Press ENTER to start simulation." << std::endl;
    std::cin.ignore();

    // Super advanced master algorithm.
    double time = 0.0;
    const double maxTime = 10.0;
    const double stepSize = 1.0/100.0;

    
    for (double time = 0.0; time < maxTime-stepSize; time += stepSize) {
        controller.Step(time, stepSize);
    }
    controller.Terminate();

{'fraction_non_alphanumeric': 0.15585774058577406, 'fraction_numerical': 0.021966527196652718, 'mean_word_length': 2.7217898832684826, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4292651', 'n_tokens_mistral': 647, 'n_tokens_neox': 610, 'n_words': 159}