<commit_before>discard """
  output: '''occupied ok: true
total ok: true'''
"""

import strutils, data

proc main =
  var m = 0
  # Since the GC test is slower than the alloc test, we only iterate 100_000 times here:
  for i in 0..100_000:
    let size = sizes[i mod sizes.len]
    let p = newString(size)
 #   c_fprintf(stdout, "iteration: %ld size: %ld\n", i, size)

main()

let occ = getOccupiedMem()
let total = getTotalMem()

# Concrete values on Win64: 58.152MiB / 188.285MiB

let occupiedOk = occ < 64 * 1024 * 1024
if not occupiedOk:
  echo "occupied ", formatSize(occ)
echo "occupied ok: ", occupiedOk<commit_msg>make tfragment_gc more robust for Appveyor<commit_after>discard """
  output: '''occupied ok: true
total ok: true'''
"""

import strutils, data

proc main =
  var m = 0
  # Since the GC test is slower than the alloc test, we only iterate 100_000 times here:
  for i in 0..100_000:
    let size = sizes[i mod sizes.len]
    let p = newString(size)
 #   c_fprintf(stdout, "iteration: %ld size: %ld\n", i, size)

main()

let occ = getOccupiedMem()
let total = getTotalMem()

# Concrete values on Win64: 58.152MiB / 188.285MiB

let occupiedOk = occ < 80 * 1024 * 1024
if not occupiedOk:
  echo "occupied ", formatSize(occ)
echo "occupied ok: ", occupiedOk
{'fraction_non_alphanumeric': 0.11626080125687353, 'fraction_numerical': 0.05813040062843677, 'mean_word_length': 3.753731343283582, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '7232372', 'n_tokens_mistral': 509, 'n_tokens_neox': 436, 'n_words': 164}