{% extends "OpenBench/base.html" %} {% block scripts %} var testMode = "stc"; var configurations = { {% for name, data in config.engines.items %} '{{name}}' : { 'stc' : { "threads" : "{{data.stc.threads}}", "hash" : "{{data.stc.hash}}", "timecontrol" : "{{data.stc.timecontrol}}" }, 'ltc' : { "threads" : "{{data.ltc.threads}}", "hash" : "{{data.ltc.hash}}", "timecontrol" : "{{data.ltc.timecontrol}}" }, 'smpstc' : { "threads" : "{{data.smpstc.threads}}", "hash" : "{{data.smpstc.hash}}", "timecontrol" : "{{data.smpstc.timecontrol}}" }, 'smpltc' : { "threads" : "{{data.smpltc.threads}}", "hash" : "{{data.smpltc.hash}}", "timecontrol" : "{{data.smpltc.timecontrol}}" }, }, {% endfor %} }; function configure(mode) { // Update global test mode testMode = mode; // Find the selected engine var selection = document.getElementById("enginename"); var engine = selection.options[selection.selectedIndex].value; // Parse out the needed configuration settings var threads = configurations[engine][mode]["threads"]; var hash = configurations[engine][mode]["hash"]; var timecontrol = configurations[engine][mode]["timecontrol"]; // Adjust all the fields to auto-fill the settings document.getElementById("devoptions").value = "Threads=" + threads + " Hash=" + hash; document.getElementById("baseoptions").value = "Threads=" + threads + " Hash=" + hash; document.getElementById("timecontrol").value = timecontrol; } {% endblock %} {% block content %}
{% endblock %}