standaloneExecutables/src/main/java/com/ge/research/semtk/standaloneExecutables/PerformanceTest.java
private static void addBatteryDescriptionsVaryingThreadsAndSize(int pass_size) throws Exception {

		// setup

		sei.clearGraph();
		uploadOwlFromSGL(sei, "/loadTestDuraBattery.owl");
		long triples = 0;

		int pass = -1;

		for (int threads = 1; threads < 10; threads += 1) {
			for (int querySize = 500; querySize < 10000; querySize += 500) {

				// reload sgJson objects so it ImportSpec can't cheat or get bogged down between loads
				SparqlGraphJson sgJson1 = getSGJsonFromSGL("/loadTestDuraBattery.json", sei, sei);
				SparqlGraphJson sgJson2 = getSGJsonFromSGL("/lookupBatteryIdAddDesc.json", sei, sei);

				// build 10,000 rows
				int i = 0;
				StringBuilder content1 = new StringBuilder();
				StringBuilder content2 = new StringBuilder();

				content1.append("description_opt, batt_ID\n");
				content2.append("description, batt_ID\n");
				for (i=0; i < pass_size; i++) {
					int index = pass * pass_size + i;
					content1.append(",id_" + index + "\n");
					content2.append("description_" + index + ",id_" + index + "\n");
				}

				// create ids
				Dataset ds1 = new CSVDataset(content1.toString(), true);
				DataLoader dl1 = new DataLoader(sgJson1, 8, ds1, "dba", "dba");
				dl1.overrideMaxThreads(threads);
				dl1.overrideInsertQueryIdealSize(querySize);
				startTask("addBatteryDescriptionsVaryingThreadsAndSize load simple " + pass_size + " total," + threads + "," + querySize + "," + (pass + 1) * pass_size);
				dl1.importData(NO_PRECHECK);
				endTask();

				// add descriptions
				Dataset ds2 = new CSVDataset(content2.toString(), true);
				DataLoader dl2 = new DataLoader(sgJson2, 8, ds2, "dba", "dba");
				dl1.overrideMaxThreads(threads);
				dl1.overrideInsertQueryIdealSize(querySize);
				startTask("addBatteryDescriptionsVaryingThreadsAndSize load lookup " + pass_size + "total," + threads + "," + querySize + "," + (pass + 1) * pass_size);
				dl2.importData(NO_PRECHECK);
				endTask();

			}

		}

	}
/**
	 * Muck with different number of threads and ideal query sizes
	 * @param passes
	 * @throws Exception
	 */
Muck with different number of threads and ideal query sizes
@param passes
@throws Exception
Muck with different number of threads and ideal query sizes @param passes @throws Exception
private static void addBatteryDescriptionsVaryingThreadsAndSize(int pass_size) throws Exception {
		sei.clearGraph();
		uploadOwlFromSGL(sei, "/loadTestDuraBattery.owl");
		long triples = 0;
		int pass = -1;
		for (int threads = 1; threads < 10; threads += 1) {
			for (int querySize = 500; querySize < 10000; querySize += 500) {
				SparqlGraphJson sgJson1 = getSGJsonFromSGL("/loadTestDuraBattery.json", sei, sei);
				SparqlGraphJson sgJson2 = getSGJsonFromSGL("/lookupBatteryIdAddDesc.json", sei, sei);
				int i = 0;
				StringBuilder content1 = new StringBuilder();
				StringBuilder content2 = new StringBuilder();
				content1.append("description_opt, batt_ID\n");
				content2.append("description, batt_ID\n");
				for (i=0; i < pass_size; i++) {
					int index = pass * pass_size + i;
					content1.append(",id_" + index + "\n");
					content2.append("description_" + index + ",id_" + index + "\n");
				}
				Dataset ds1 = new CSVDataset(content1.toString(), true);
				DataLoader dl1 = new DataLoader(sgJson1, 8, ds1, "dba", "dba");
				dl1.overrideMaxThreads(threads);
				dl1.overrideInsertQueryIdealSize(querySize);
				startTask("addBatteryDescriptionsVaryingThreadsAndSize load simple " + pass_size + " total," + threads + "," + querySize + "," + (pass + 1) * pass_size);
				dl1.importData(NO_PRECHECK);
				endTask();
				Dataset ds2 = new CSVDataset(content2.toString(), true);
				DataLoader dl2 = new DataLoader(sgJson2, 8, ds2, "dba", "dba");
				dl1.overrideMaxThreads(threads);
				dl1.overrideInsertQueryIdealSize(querySize);
				startTask("addBatteryDescriptionsVaryingThreadsAndSize load lookup " + pass_size + "total," + threads + "," + querySize + "," + (pass + 1) * pass_size);
				dl2.importData(NO_PRECHECK);
				endTask();
			}
		}
	}
private static void addBatteryDescriptionsVaryingThreadsAndSize ( int pass_size ) throws Exception { sei . clearGraph ( ) ; uploadOwlFromSGL ( sei , "/loadTestDuraBattery.owl" ) ; long triples = 0 ; int pass = - 1 ; for ( int threads = 1 ; threads < 10 ; threads += 1 ) { for ( int querySize = 500 ; querySize < 10000 ; querySize += 500 ) { SparqlGraphJson sgJson1 = getSGJsonFromSGL ( "/loadTestDuraBattery.json" , sei , sei ) ; SparqlGraphJson sgJson2 = getSGJsonFromSGL ( "/lookupBatteryIdAddDesc.json" , sei , sei ) ; int i = 0 ; StringBuilder content1 = new StringBuilder ( ) ; StringBuilder content2 = new StringBuilder ( ) ; content1 . append ( "description_opt, batt_ID\n" ) ; content2 . append ( "description, batt_ID\n" ) ; for ( i = 0 ; i < pass_size ; i ++ ) { int index = pass * pass_size + i ; content1 . append ( ",id_" + index + "\n" ) ; content2 . append ( "description_" + index + ",id_" + index + "\n" ) ; } Dataset ds1 = new CSVDataset ( content1 . toString ( ) , true ) ; DataLoader dl1 = new DataLoader ( sgJson1 , 8 , ds1 , "dba" , "dba" ) ; dl1 . overrideMaxThreads ( threads ) ; dl1 . overrideInsertQueryIdealSize ( querySize ) ; startTask ( "addBatteryDescriptionsVaryingThreadsAndSize load simple " + pass_size + " total," + threads + "," + querySize + "," + ( pass + 1 ) * pass_size ) ; dl1 . importData ( NO_PRECHECK ) ; endTask ( ) ; Dataset ds2 = new CSVDataset ( content2 . toString ( ) , true ) ; DataLoader dl2 = new DataLoader ( sgJson2 , 8 , ds2 , "dba" , "dba" ) ; dl1 . overrideMaxThreads ( threads ) ; dl1 . overrideInsertQueryIdealSize ( querySize ) ; startTask ( "addBatteryDescriptionsVaryingThreadsAndSize load lookup " + pass_size + "total," + threads + "," + querySize + "," + ( pass + 1 ) * pass_size ) ; dl2 . importData ( NO_PRECHECK ) ; endTask ( ) ; } } }
Muck with different number of threads and ideal query sizes
 @param passes
 @throws Exception
Muck with different number of threads and ideal query sizes @param passes @throws Exception
// setup // reload sgJson objects so it ImportSpec can't cheat or get bogged down between loads // build 10,000 rows // create ids // add descriptions