<commit_before>// you were going to find out how to fix this race condition

var quicktests = {};

function loadScript(url) {
  return new Promise(function(resolve, reject) {
    var element = document.createElement("script");
    element.type = "text/javascript";
    element.src = url;
    element.onload = resolve;
    document.head.appendChild(element);
  });
}

var Plottables = {};
function loadPlottable(branchName) {
  return new Promise(function (fulfill, reject) {
    if (Plottables[branchName] != null) {
      fulfill();
    }
    var url;
    if (branchName !== "#local") {
      url = "https://rawgithub.com/palantir/plottable/" + branchName + "/plottable.js";
    } else {
      url = "/plottable.js"; //load local version
    }
    return loadScript(url).then(function() {
      Plottables[branchName] = Plottable;
      Plottable = null;
      fulfill();
    });
  });
}


var data1 = makeRandomData(50);
var data2 = makeRandomData(50);

function runSingleQuicktest(container, quickTest, data, Plottable) {
  container.append("p").text(quickTest.name);
  var div = container.append("div");
  quickTest.run(div, data, Plottable);
}

function runQuicktest(tableSelection, quickTest, Plottable1, Plottable2) {
  var tr = tableSelection.append("tr").classed("quicktest-row", true);<commit_msg>log errors, since they don't show in the console<commit_after>// you were going to find out how to fix this race condition

var quicktests = {};

function loadScript(url) {
  return new Promise(function(resolve, reject) {
    var element = document.createElement("script");
    element.type = "text/javascript";
    element.src = url;
    element.onload = resolve;
    document.head.appendChild(element);
  });
}

var Plottables = {};
function loadPlottable(branchName) {
  return new Promise(function (fulfill, reject) {
    if (Plottables[branchName] != null) {
      fulfill();
    }
    var url;
    if (branchName !== "#local") {
      url = "https://rawgithub.com/palantir/plottable/" + branchName + "/plottable.js";
    } else {
      url = "/plottable.js"; //load local version
    }
    return loadScript(url).then(function() {
      Plottables[branchName] = Plottable;
      Plottable = null;
      fulfill();
    });
  });
}


var data1 = makeRandomData(50);
var data2 = makeRandomData(50);

function runSingleQuicktest(container, quickTest, data, Plottable) {
  container.append("p").text(quickTest.name);
  var div = container.append("div");
  try {
    quickTest.run(div, data, Plottable);
  } catch (e) {
    console.log(e.stack);
    throw e;
  }
}

function runQuicktest(tableSelection, quickTest, Plottable1, Plottable2) {
  var tr = tableSelection.append("tr").classed("quicktest-row", true);
{'fraction_non_alphanumeric': 0.14275202354672553, 'fraction_numerical': 0.005886681383370125, 'mean_word_length': 3.6798623063683307, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1424793', 'n_tokens_mistral': 864, 'n_tokens_neox': 860, 'n_words': 199}