<commit_before>// This file is part of the dune-stuff project:
//   https://github.com/wwu-numerik/dune-stuff
// Copyright holders: <NAME>, <NAME>
// License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)

#include "config.h"

#include <sys/time.h>

#include <dune/stuff/test/gtest/gtest.h>

#include "main_header.hh"

void busywait(const int ms)
{
  // "round" up to next full 10 ms to align with native timer res
  const int milliseconds = (ms/10)*10 + 10;
  timeval start, end;
  gettimeofday(&start, NULL);
  do {
   gettimeofday(&end, NULL);
  } while (((end.tv_sec - start.tv_sec)*1e6) + ((end.tv_usec - start.tv_usec)) < milliseconds*1000);
} // ... busywait(...)


namespace Dune {
namespace Stuff {
namespace Test {


void check_for_success(const Dune::Stuff::Common::ConvergenceStudy& study,
                       const std::map< std::string, std::vector< double > >& errors_map)
{
  for (const auto& norm : study.used_norms()) {<commit_msg>[test.common] updated include<commit_after>// This file is part of the dune-stuff project:
//   https://github.com/wwu-numerik/dune-stuff
// Copyright holders: <NAME>, <NAME>
// License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)

#include "config.h"

#include <sys/time.h>

#include <dune/stuff/test/gtest/gtest.h>

#include "common.hh"

void busywait(const int ms)
{
  // "round" up to next full 10 ms to align with native timer res
  const int milliseconds = (ms/10)*10 + 10;
  timeval start, end;
  gettimeofday(&start, NULL);
  do {
   gettimeofday(&end, NULL);
  } while (((end.tv_sec - start.tv_sec)*1e6) + ((end.tv_usec - start.tv_usec)) < milliseconds*1000);
} // ... busywait(...)


namespace Dune {
namespace Stuff {
namespace Test {


void check_for_success(const Dune::Stuff::Common::ConvergenceStudy& study,
                       const std::map< std::string, std::vector< double > >& errors_map)
{
  for (const auto& norm : study.used_norms()) {
{'fraction_non_alphanumeric': 0.1589167092488503, 'fraction_numerical': 0.016351558507920288, 'mean_word_length': 3.6179245283018866, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '2235927', 'n_tokens_mistral': 723, 'n_tokens_neox': 681, 'n_words': 172}