function RunRibosomeTest() {
	var startTime = new Date();

	var chain = '';

	var iterations=0;
	var now = new Date();
	while (now.getTime()-startTime.getTime()<LengthPerTest) {
		chain += ReturnNucleotideChain(1000);  //add 1000 base units to the current nucleotide chain
		var mutation1 = ReturnNucleotideChain(3); //find this codon
		var mutation2 = ReturnNucleotideChain(3); //replace mutation #1 with this codon
		chain = chain.replace(mutation1,mutation2);	//Run a regex replacement

		iterations += 1;
		now = new Date();
	}
		
	var adjustedLength;
	adjustedLength = iterations/(now.getTime()-startTime.getTime());

	return adjustedLength;
}

function ReturnNucleotideChain(totalUnits) {
	var ret = '';
	for (i=0;i<totalUnits;i++) {
		ret += ReturnRandomNucleotide();
	}
	return ret;
}

function ReturnRandomNucleotide() {
	var randNucleotide = Math.floor((Math.random()) * 4) + 1;
	switch (randNucleotide) {
		case 1:
			return 'A'; break;
		case 2:
			return 'T'; break;
		case 3:
			return 'C'; break;
		case 4:
			return 'G'; break;
	}
}