<commit_before>#include "benchmark.h"
#include "examplequeries.h"

char tuebaCorpus[] = "tuebadz6";
char tuebaCorpusSmall[] = "tuebadz6_small";

class TuebaFixture : public CorpusFixture<true, tuebaCorpus>
{
public:
  DBGETTER

  virtual ~TuebaFixture() {}

};
class TuebaFallbackFixture : public CorpusFixture<false, tuebaCorpus>
{
public:
  DBGETTER


  virtual ~TuebaFallbackFixture() {}
};

class TuebaFixtureVar : public CorpusFixture<true, tuebaCorpus>
{
public:
  DBGETTER

  virtual std::vector<int64_t> getExperimentValues() const
  {
    return {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
  }

  virtual void setUp(int64_t experimentValue)
  {
    CorpusFixture::setUp(experimentValue);
    maxDistance = experimentValue;
  }

  virtual ~TuebaFixtureVar() {}

  unsigned int maxDistance;
};
class TuebaFallbackFixtureVar : public CorpusFixture<false, tuebaCorpus>
{
public:


  DB& getDB()
  {
    static DB dbHolder = initDB();
    return dbHolder;
  }

  virtual std::vector<int64_t> getExperimentValues() const
  {
    return {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
  }

  virtual void setUp(int64_t experimentValue)
  {
    CorpusFixture::setUp(experimentValue);
    maxDistance = experimentValue;
  }

  virtual ~TuebaFallbackFixtureVar() {}
  unsigned int maxDistance;
};


BASELINE_F(Tueba_Mixed1, Fallback, TuebaFallbackFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(Mixed1, getDB(), 0u);
}


BENCHMARK_F(Tueba_Mixed1, Optimized, TuebaFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(Mixed1, getDB(), 0u);
}

BASELINE_F(Tueba_RegexDom, Fallback, TuebaFallbackFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(RegexDom, getDB(), 12u);
}


BENCHMARK_F(Tueba_RegexDom, Optimized, TuebaFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(RegexDom, getDB(), 12u);
}

BASELINE_F(Tueba_Inclusion, Fallback, TuebaFallbackFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(PPERIncludesAnaphoric, getDB(), 13031u);
}


BENCHMARK_F(Tueba_Inclusion, Optimized, TuebaFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(PPERIncludesAnaphoric, getDB(), 13031u);
}

BASELINE_F(Tueba_DomEdgeAnno, Fallback, TuebaFallbackFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(DomFuncON, getDB(), 153u);
}


BENCHMARK_F(Tueba_DomEdgeAnno, Optimized, TuebaFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(DomFuncON, getDB(), 153u);
}

BASELINE_F(Tueba_NodeDom, Fallback, TuebaFallbackFixtureVar, 5, 1)
{
  counter = 0;
  Query q=annis::ExampleQueries::NodeDom(getDB(), maxDistance);
  while(q.hasNext())
  {
    q.next();
    counter++;
  }
}


BENCHMARK_F(Tueba_NodeDom, Optimized, TuebaFixtureVar, 5, 1)
{
  counter = 0;
  Query q=annis::ExampleQueries::NodeDom(getDB(), maxDistance);
  while(q.hasNext())
  {<commit_msg>fix wrong count<commit_after>#include "benchmark.h"
#include "examplequeries.h"

char tuebaCorpus[] = "tuebadz6";
char tuebaCorpusSmall[] = "tuebadz6_small";

class TuebaFixture : public CorpusFixture<true, tuebaCorpus>
{
public:
  DBGETTER

  virtual ~TuebaFixture() {}

};
class TuebaFallbackFixture : public CorpusFixture<false, tuebaCorpus>
{
public:
  DBGETTER


  virtual ~TuebaFallbackFixture() {}
};

class TuebaFixtureVar : public CorpusFixture<true, tuebaCorpus>
{
public:
  DBGETTER

  virtual std::vector<int64_t> getExperimentValues() const
  {
    return {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
  }

  virtual void setUp(int64_t experimentValue)
  {
    CorpusFixture::setUp(experimentValue);
    maxDistance = experimentValue;
  }

  virtual ~TuebaFixtureVar() {}

  unsigned int maxDistance;
};
class TuebaFallbackFixtureVar : public CorpusFixture<false, tuebaCorpus>
{
public:


  DB& getDB()
  {
    static DB dbHolder = initDB();
    return dbHolder;
  }

  virtual std::vector<int64_t> getExperimentValues() const
  {
    return {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
  }

  virtual void setUp(int64_t experimentValue)
  {
    CorpusFixture::setUp(experimentValue);
    maxDistance = experimentValue;
  }

  virtual ~TuebaFallbackFixtureVar() {}
  unsigned int maxDistance;
};


BASELINE_F(Tueba_Mixed1, Fallback, TuebaFallbackFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(Mixed1, getDB(), 0u);
}


BENCHMARK_F(Tueba_Mixed1, Optimized, TuebaFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(Mixed1, getDB(), 0u);
}

BASELINE_F(Tueba_RegexDom, Fallback, TuebaFallbackFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(RegexDom, getDB(), 1u);
}


BENCHMARK_F(Tueba_RegexDom, Optimized, TuebaFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(RegexDom, getDB(), 1u);
}

BASELINE_F(Tueba_Inclusion, Fallback, TuebaFallbackFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(PPERIncludesAnaphoric, getDB(), 13031u);
}


BENCHMARK_F(Tueba_Inclusion, Optimized, TuebaFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(PPERIncludesAnaphoric, getDB(), 13031u);
}

BASELINE_F(Tueba_DomEdgeAnno, Fallback, TuebaFallbackFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(DomFuncON, getDB(), 76748u);
}


BENCHMARK_F(Tueba_DomEdgeAnno, Optimized, TuebaFixture, 5, 1)
{
  ANNIS_EXEC_QUERY(DomFuncON, getDB(), 76748u);
}

BASELINE_F(Tueba_NodeDom, Fallback, TuebaFallbackFixtureVar, 5, 1)
{
  counter = 0;
  Query q=annis::ExampleQueries::NodeDom(getDB(), maxDistance);
  while(q.hasNext())
  {
    q.next();
    counter++;
  }
}


BENCHMARK_F(Tueba_NodeDom, Optimized, TuebaFixtureVar, 5, 1)
{
  counter = 0;
  Query q=annis::ExampleQueries::NodeDom(getDB(), maxDistance);
  while(q.hasNext())
  {
{'fraction_non_alphanumeric': 0.12863705972434916, 'fraction_numerical': 0.03560490045941807, 'mean_word_length': 5.34872417982989, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1268551', 'n_tokens_mistral': 2381, 'n_tokens_neox': 2128, 'n_words': 396}