def summarizeFiles(): if cycleFile == None: return if SneeqlLib.optMeasurementsActiveAgendaLoops != None: CycleCompare.summarize(cycleFile, SneeqlLib.optMeasurementsActiveAgendaLoops - 1, testLength) CycleCompare.summarize(greenFile, SneeqlLib.optMeasurementsActiveAgendaLoops - 1, testLength) CycleCompare.summarize(energyFile, SneeqlLib.optMeasurementsActiveAgendaLoops - 1, testLength) CycleCompare.summarize(redFile, SneeqlLib.optMeasurementsActiveAgendaLoops - 1, testLength) CycleCompare.summarize(sizeFile, SneeqlLib.optMeasurementsActiveAgendaLoops - 1, testLength) CycleCompare.summarize(yellowFile, SneeqlLib.optMeasurementsActiveAgendaLoops - 1, testLength) return if optMeasurementsMaxActiveAgendaLoops != None: CycleCompare.summarize(cycleFile, optMeasurementsMaxActiveAgendaLoops - 1, testLength) CycleCompare.summarize(greenFile, optMeasurementsMaxActiveAgendaLoops - 1, testLength) CycleCompare.summarize(energyFile, optMeasurementsMaxActiveAgendaLoops - 1, testLength) CycleCompare.summarize(redFile, optMeasurementsMaxActiveAgendaLoops - 1, testLength) CycleCompare.summarize(sizeFile, optMeasurementsMaxActiveAgendaLoops - 1, testLength) CycleCompare.summarize(yellowFile, optMeasurementsMaxActiveAgendaLoops - 1, testLength) return cycleFile.close() greenFile.close() energyFile.close() redFile.close() sizeFile.close() yellowFile.close()
def copyFiles(queryDir, moteNum, text): print(str(cycleFile)) print(queryDir) if ((moteNum == None) or (moteNum == 0)): CycleCompare.copyFile2(queryDir, cycleFile, "Cycle", text) cycleFile.write("\n") CycleCompare.copyFile2(queryDir, greenFile, "green", text) CycleCompare.copyFile2(queryDir, energyFile, "energy", text) energyFile.write("\n") CycleCompare.copyFile2(queryDir, redFile, "red", text) CycleCompare.copyFile2(queryDir, sizeFile, "size", text) CycleCompare.copyFile2(queryDir, yellowFile, "yellow", text) else: CycleCompare.copyAFile2(queryDir, cycleFile, "Cycle", moteNum, text) CycleCompare.copyAFile2(queryDir, greenFile, "green", moteNum, text) CycleCompare.copyAFile2(queryDir, energyFile, "energy", moteNum, text) CycleCompare.copyAFile2(queryDir, redFile, "red", moteNum, text) CycleCompare.copyAFile2(queryDir, sizeFile, "size", moteNum, text) CycleCompare.copyAFile2(queryDir, yellowFile, "yellow", moteNum, text)
def copyFiles(queryDir, moteNum): if cycleFile == None: return if ((moteNum == None) or (moteNum == 0)): dataArray = CycleCompare.copyFile(queryDir, cycleFile, "Cycle") cycleFile.write("\n") superCycleFile.write("," + dataArray[len(dataArray) - 1][1]) superCycleFile.write("," + dataArray[len(dataArray) - 2][1]) if SneeqlLib.optNescGreenExperiment == None: dataArray = CycleCompare.copyFile(queryDir, greenFile, "green") else: dataArray = CycleCompare.copyFile(queryDir, "green", SneeqlLib.optNescGreenExperiment) superGreenFile.write("," + dataArray[len(dataArray) - 1][1]) dataArray = CycleCompare.copyFile(queryDir, energyFile, "energy") energyFile.write("\n") superEnergyFile.write("," + dataArray[len(dataArray) - 1][1]) superEnergyFile.write("," + dataArray[len(dataArray) - 2][1]) if SneeqlLib.optNescRedExperiment == None: dataArray = CycleCompare.copyFile(queryDir, redFile, "red") else: dataArray = CycleCompare.copyFile(queryDir, redFile, SneeqlLib.optNescRedExperiment) superRedFile.write("," + dataArray[len(dataArray) - 1][1]) dataArray = CycleCompare.copyFile(queryDir, sizeFile, "size") superRAMFile.write("," + dataArray[len(dataArray) - 1][1]) superROMFile.write("," + dataArray[len(dataArray) - 1][1]) if SneeqlLib.optNescYellowExperiment == None: dataArray = CycleCompare.copyFile(queryDir, yellowFile, "yellow") else: dataArray = CycleCompare.copyFile( queryDir, yellowFile, SneeqlLib.optNescYellowExperiment) superYellowFile.write("," + dataArray[len(dataArray) - 1][1]) else: CycleCompare.copyAFile(queryDir, cycleFile, "Cycle", moteNum) cycleFile.write("\n") if SneeqlLib.optNescGreenExperiment == None: CycleCompare.copyAFile(queryDir, greenFile, "green", moteNum) else: CycleCompare.copyAFile(queryDir, greenFile, SneeqlLib.optNescGreenExperiment, moteNum) CycleCompare.copyAFile(queryDir, energyFile, "energy", moteNum) energyFile.write("\n") if SneeqlLib.optNescRedExperiment == None: CycleCompare.copyAFile(queryDir, redFile, "red", moteNum) else: CycleCompare.copyAFile(queryDir, redFile, SneeqlLib.optNescRedExperiment, moteNum) CycleCompare.copyAFile(queryDir, sizeFile, "size", moteNum) if SneeqlLib.optNescYellowExperiment == None: CycleCompare.copyAFile(queryDir, yellowFile, "yellow", moteNum) else: CycleCompare.copyAFile(queryDir, yellowFile, SneeqlLib.optNescYellowExperiment, moteNum)
def copyFiles(queryDir, moteNum, text): print(str(cycleFile)) print(queryDir) if ((moteNum == None) or (moteNum == 0)): CycleCompare.copyFile2(queryDir, cycleFile, "Cycle", text) cycleFile.write("\n") array = CycleCompare.copyFile2(queryDir, energyFile, "energy", text) queryEnergyFile.write(array[1][2] + ",") energyFile.write("\n") array = CycleCompare.copyFile2(queryDir, greenFile, "green", text) queryGreenFile.write(array[1][3] + ",") array = CycleCompare.copyFile2(queryDir, redFile, "red", text) queryRedFile.write(array[1][3] + ",") array = CycleCompare.copyFile2(queryDir, yellowFile, "yellow", text) queryYellowFile.write(array[1][3] + ",") queryYellowMinFile.write(array[1][2] + ",") else: CycleCompare.copyAFile2(queryDir, cycleFile, "Cycle", moteNum, text) cycleFile.write("\n") array = CycleCompare.copyAFile2(queryDir, energyFile, "energy", moteNum, text) queryEnergyFile.write(array[0][2] + ",") energyFile.write("\n") array = CycleCompare.copyAFile2(queryDir, greenFile, "green", moteNum, text) queryGreenFile.write(array[0][3] + ",") array = CycleCompare.copyAFile2(queryDir, redFile, "red", moteNum, text) queryRedFile.write(array[0][3] + ",") array = CycleCompare.copyAFile2(queryDir, yellowFile, "yellow", moteNum, text) queryYellowFile.write(array[0][3] + ",") queryYellowMinFile.write(array[0][2] + ",")