Esempio n. 1
0
def testTossimCandidate(nescDir, traceFilePath, query, numNodes, duration, outputPath, schemaPath, aqRate):

	#compile the nesc
	exitVal = TossimLib.compileNesCCode(nescDir)
	if (exitVal != 0):
		return;		

	#run tossim simulation		
	exitVal = TossimLib.runSimulation(nescDir, traceFilePath, query, numNodes, simulationDuration = (duration + optTossimSyncTime))
	if (exitVal != 0):
		return;

	#check all tuples present in Tossim simulation
	queryPlanSummaryFile = "%s/%s/query-plan/query-plan-summary.txt" % (outputPath, query)
	actualBFactor = SneeqlLib.getBufferingFactor(queryPlanSummaryFile)
	checkTupleCount.checkResults(query, traceFilePath, schemaPath, aqRate, actualBFactor, duration)
Esempio n. 2
0
def testTossimCandidate(nescDir, traceFilePath, query, numNodes, duration,
                        outputPath, schemaPath, aqRate):

    #compile the nesc
    exitVal = TossimLib.compileNesCCode(nescDir)
    if (exitVal != 0):
        return

    #run tossim simulation
    exitVal = TossimLib.runSimulation(nescDir,
                                      traceFilePath,
                                      query,
                                      numNodes,
                                      simulationDuration=(duration +
                                                          optTossimSyncTime))
    if (exitVal != 0):
        return
Esempio n. 3
0
def testTossimCandidate(nescDir, traceFilePath, query, numNodes, duration, outputPath, schemaPath, aqRate):

	#compile the nesc
	exitVal = TossimLib.compileNesCCode(nescDir)
	if (exitVal != 0):
		return;		

	#run tossim simulation		
	exitVal = TossimLib.runSimulation(nescDir, traceFilePath, query, numNodes, simulationDuration = (duration + optTossimSyncTime))
	if (exitVal != 0):
		return;

	#check all tuples present in Tossim simulation
	queryPlanSummaryFile = "%s/%s/query-plan/query-plan-summary.csv" % (outputPath, query)
	
	candidateInfo = getCandidateSummaryInformation(nescDir, query, outputPath)
	alpha = int(candidateInfo['alpha-ms'])
	bufferingFactor = int(candidateInfo['beta'])
	checkTupleCount.checkResults(query, traceFilePath, schemaPath, alpha, bufferingFactor, duration)