<commit_before>import module namespace datetime = "http://www.zorba-xquery.com/modules/datetime";

declare sequential function local:index()
{ 
  let $table :=
      for $i in 1 to 100
      return
          block {
            declare $local:datetime;
            declare $local:date;
            declare $local:time;
            set $local:datetime := datetime:current-dateTime();
            set $local:date     := datetime:current-date();
            set $local:time     := datetime:current-time();
            <tr>
              <td> { $local:datetime } </td>
              <td> { $local:date } </td>
              <td> { $local:time } </td>                                                                               
            </tr>;
          }
  return
    let $wrapped := <table> { $table } </table>
    return
      <html>
        <body>
          <b> Different DateTimes: { count(fn:distinct-values($wrapped//tr/td[1])) gt 1 } </b><br/>
          <b> Different Dates: { count(fn:distinct-values($wrapped//tr/td[2])) gt 1 } </b><br/>
          <b> Different Times: { count(fn:distinct-values($wrapped//tr/td[3])) gt 1 } </b><br/>
        </body>
      </html>
};

local:index()<commit_msg>fixed the nondeterministic datetime test to work even on fast systems, where generating 100 datetimes wasn't enough<commit_after>import module namespace datetime = "http://www.zorba-xquery.com/modules/datetime";

declare sequential function local:index()
{ 
  let $table :=
      for $i in 1 to 10000
      return
          block {
            declare $local:datetime;
            declare $local:date;
            declare $local:time;
            set $local:datetime := datetime:current-dateTime();
            set $local:date     := datetime:current-date();
            set $local:time     := datetime:current-time();
            <tr>
              <td> { $local:datetime } </td>
              <td> { $local:date } </td>
              <td> { $local:time } </td>                                                                               
            </tr>;
          }
  return
    let $wrapped := <table> { $table } </table>
    return
      <html>
        <body>
          <b> Different DateTimes: { count(fn:distinct-values($wrapped//tr/td[1])) gt 1 } </b><br/>
          <b> Different Dates: { count(fn:distinct-values($wrapped//tr/td[2])) gt 1 } </b><br/>
          <b> Different Times: { count(fn:distinct-values($wrapped//tr/td[3])) gt 1 } </b><br/>
        </body>
      </html>
};

local:index()
{'fraction_non_alphanumeric': 0.15127388535031847, 'fraction_numerical': 0.009952229299363057, 'mean_word_length': 1.648050579557429, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6955726', 'n_tokens_mistral': 752, 'n_tokens_neox': 720, 'n_words': 171}