...
 
Commits (7)
......@@ -16,16 +16,25 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 10,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"source": [
"%load_ext autoreload"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
......@@ -34,7 +43,18 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# Add the JBrainy directory to the path\n",
"import sys\n",
"sys.path.append('../')"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
......@@ -53,7 +73,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
......@@ -71,20 +91,20 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"data = load_training_data(\"data/jmh-results-9307f70f.csv\",\n",
" \"software-perf.csv\",\n",
" \"data/hardware-perf-data.csv\")\n",
"data = load_training_data(\"../data/jmh-results-9307f70f.csv\",\n",
" \"../data/software-counters-21-01-20.csv\",\n",
" \"../data/hardware-perf-data.csv\")\n",
"\n",
"benchmark_data = data[\"data\"]"
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 15,
"metadata": {},
"outputs": [
{
......@@ -383,7 +403,7 @@
"[8 rows x 101 columns]"
]
},
"execution_count": 4,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
......@@ -401,7 +421,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 16,
"metadata": {},
"outputs": [
{
......@@ -419,7 +439,7 @@
" 'addAll(int, Collection)', 'clear()', 'contains(Object)',\n",
" 'containsAll(Collection)', 'containsKey(Object)',\n",
" 'containsValue(Object)', 'entrySet()', 'equals(Object)',\n",
" 'get(Object)', 'hashCode()', 'indexOf(Object)', 'isEmpty()',\n",
" 'get(int)', 'hashCode()', 'indexOf(Object)', 'isEmpty()',\n",
" 'iterator()', 'keySet()', 'lastIndexOf(Object)', 'listIterator()',\n",
" 'listIterator(int)', 'put(Object, Object)', 'putAll(Map)',\n",
" 'remove(Object)', 'remove(int)', 'removeAll(Collection)',\n",
......@@ -441,7 +461,7 @@
" dtype=object)"
]
},
"execution_count": 5,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
......@@ -459,7 +479,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
......@@ -509,7 +529,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
......@@ -518,7 +538,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
......@@ -529,7 +549,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 20,
"metadata": {},
"outputs": [
{
......@@ -828,7 +848,7 @@
"[8 rows x 101 columns]"
]
},
"execution_count": 9,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
......@@ -843,7 +863,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
......@@ -857,7 +877,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
......@@ -867,7 +887,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
......@@ -4507,14 +4527,14 @@
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
"pygments_lexer": "ipython2",
"version": "2.7.15+"
}
},
"nbformat": 4,
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -25,7 +25,7 @@ public class ListApplicationBenchmark {
@Param({"LinkedList", "ArrayList", "Vector"})
public String datastructureName;
@Param({"0", "1000", "2000"})
@Param({"0", "1000", "10000", "1000000"})
public int baseStructureSize;
public Application currentApplication;
......
......@@ -21,7 +21,7 @@ public class MapApplicationBenchmark {
@Param({"HashMap", "TreeMap", "IdentityHashMap", "LinkedHashMap", "WeakHashMap"})
public String datastructureName;
@Param({"0", "1000", "2000"})
@Param({"0", "1000", "10000", "1000000"})
public int baseStructureSize;
public Application currentApplication;
......
......@@ -21,7 +21,7 @@ public class SetApplicationBenchmark {
@Param({"HashSet", "TreeSet", "LinkedHashSet"})
public String datastructureName;
@Param({"0", "1000", "2000"})
@Param({"0", "1000", "10000", "1000000"})
public int baseStructureSize;
public Application currentApplication;
......
......@@ -2,11 +2,13 @@ package se.lth.cs.jmh.commandline
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.parameters.options.default
import com.github.ajalt.clikt.parameters.options.flag
import com.github.ajalt.clikt.parameters.options.option
import com.github.ajalt.clikt.parameters.types.int
import com.github.ajalt.clikt.parameters.types.long
import org.openjdk.jmh.results.format.ResultFormatType
import org.openjdk.jmh.runner.Runner
import org.openjdk.jmh.runner.options.CommandLineOptions
import org.openjdk.jmh.runner.options.OptionsBuilder
import org.openjdk.jmh.runner.options.TimeValue
import se.lth.cs.jmh.JMHTimedRunner
......@@ -48,6 +50,12 @@ class JMHCommandLine : CliktCommand() {
val infoFileName : String? by option("--info-file", "-p",
help="File name to write data about JMH run")
/**
* A field to activate a smaller run to test things.
*/
val quickBenchmark : Boolean by option("--quick-bench", "-q",
help="Run a smaller benchmark").flag()
override fun run() {
val seedsText = IntRange(0, numberSeeds - 1)
.map { it.toString() }
......@@ -61,12 +69,19 @@ class JMHCommandLine : CliktCommand() {
.measurementIterations(measurementIterations)
.resultFormat(ResultFormatType.CSV)
.result(String.format("jmh-results-%s.csv", getCommit()))
.param("seed", *seedsText)
if (quickBenchmark) {
opts.param("seed", "0", "1", "2")
.include("List")
.param("baseStructureSize", "100000")
.param("applicationSize", "10", "100", "1000")
} else {
opts.param("seed", *seedsText)
.param("baseStructureSize", "0", "1000", "10000")
.param("applicationSize", "10", "100", "1000")
.build()
}
val r = JMHTimedRunner(opts)
val r = JMHTimedRunner(opts.build())
val results = r.runWithTime()
if (!infoFileName.isNullOrBlank()) {
......
......@@ -289,7 +289,7 @@ def load_training_data(jmh_results_filename,
# OK.
continue
else:
raise "The path '{0}' does not exist".format(file)
raise Exception("The path '{0}' does not exist".format(file))
# Ok here we go
jmh_with_best = load_jmh_data(jmh_results_filename)
......