◆ setUp()
def edmModuleAllocMonitorAnalyze.TestModuleCommand.setUp |
( |
|
self | ) |
|
Definition at line 1309 of file edmModuleAllocMonitorAnalyze.py.
1310 self.tracerFile = DummyFile()
1316 self.tracerFile.extend([
1320 f
'F {Phase.startTracing} 0 0 0 0 {incr(t)}',
1321 f
'S {Phase.construction} 0 {incr(t)}',
1322 f
's {Phase.construction} 0 {incr(t)} 1 1 10 0 10 10',
1323 f
'M {Phase.construction} 0 1 0 {incr(t)}',
1324 f
'm {Phase.construction} 0 1 0 {incr(t)} 3 2 20 0 50 25',
1325 f
'F {Phase.beginJob} 0 0 0 0 {incr(t)}',
1326 f
'M {Phase.beginJob} 0 1 0 {incr(t)}',
1327 f
'm {Phase.beginJob} 0 1 0 {incr(t)} 3 2 20 0 50 25',
1328 f
'f {Phase.beginJob} 0 0 0 0 {incr(t)}',
1329 f
'F {Phase.beginProcessBlock} 0 0 0 0 {incr(t)}',
1330 f
'f {Phase.beginProcessBlock} 0 0 0 0 {incr(t)}',
1331 f
'S {Phase.getNextTransition} {incr(t)}',
1332 f
's {Phase.getNextTransition} {incr(t)} 1 1 10 0 10 10',
1333 f
'S {Phase.globalBeginRun} 0 {incr(t)}',
1334 f
's {Phase.globalBeginRun} 0 {incr(t)} 1 1 10 0 10 10',
1335 f
'S {Phase.getNextTransition} {incr(t)}',
1336 f
's {Phase.getNextTransition} {incr(t)} 1 1 10 0 10 10',
1337 f
'F {Phase.globalBeginRun} 0 1 0 0 {incr(t)}',
1338 f
'M {Phase.globalBeginRun} 0 1 0 {incr(t)}',
1339 f
'm {Phase.globalBeginRun} 0 1 0 {incr(t)} 3 2 20 0 50 25',
1340 f
'f {Phase.globalBeginRun} 0 1 0 0 {incr(t)}',
1341 f
'S {Phase.getNextTransition} {incr(t)}',
1342 f
's {Phase.getNextTransition} {incr(t)} 1 1 10 0 10 10',
1343 f
'F {Phase.streamBeginRun} 0 1 0 0 {incr(t)}',
1344 f
'M {Phase.streamBeginRun} 0 1 0 {incr(t)}',
1345 f
'm {Phase.streamBeginRun} 0 1 0 {incr(t)} 3 2 20 0 50 25',
1346 f
'f {Phase.streamBeginRun} 0 1 0 0 {incr(t)}',
1347 f
'F {Phase.streamBeginRun} 1 1 0 0 {incr(t)}',
1348 f
'M {Phase.streamBeginRun} 1 1 0 {incr(t)}',
1349 f
'm {Phase.streamBeginRun} 1 1 0 {incr(t)} 3 2 20 0 50 25',
1350 f
'f {Phase.streamBeginRun} 1 1 0 0 {incr(t)}',
1351 f
'S {Phase.globalBeginLumi} 0 {incr(t)}',
1352 f
's {Phase.globalBeginLumi} 0 {incr(t)} 1 1 10 0 10 10',
1353 f
'S {Phase.getNextTransition} {incr(t)}',
1354 f
's {Phase.getNextTransition} {incr(t)} 1 1 10 0 10 10',
1355 f
'F {Phase.globalBeginLumi} 0 1 1 0 {incr(t)}',
1356 f
'M {Phase.globalBeginLumi} 0 1 0 {incr(t)}',
1357 f
'm {Phase.globalBeginLumi} 0 1 0 {incr(t)} 3 2 20 0 50 25',
1358 f
'f {Phase.globalBeginLumi} 0 1 1 0 {incr(t)}',
1359 f
'F {Phase.streamBeginLumi} 0 1 1 0 {incr(t)}',
1360 f
'f {Phase.streamBeginLumi} 0 1 1 0 {incr(t)}',
1361 f
'F {Phase.streamBeginLumi} 1 1 1 0 {incr(t)}',
1362 f
'f {Phase.streamBeginLumi} 1 1 1 0 {incr(t)}',
1363 f
'S {Phase.Event} 0 {incr(t)}',
1364 f
's {Phase.Event} 0 {incr(t)} 1 1 10 0 10 10',
1365 f
'S {Phase.getNextTransition} {incr(t)}',
1366 f
's {Phase.getNextTransition} {incr(t)} 1 1 10 0 10 10',
1367 f
'F {Phase.Event} 0 1 1 1 {incr(t)}',
1368 f
'S {Phase.Event} 1 {incr(t)}',
1369 f
's {Phase.Event} 1 {incr(t)} 1 1 10 0 10 10',
1370 f
'F {Phase.Event} 1 1 1 2 {incr(t)}',
1371 f
'N {Phase.Event} 0 1 1 0 {incr(t)}',
1372 f
'n {Phase.Event} 0 1 1 0 {incr(t)} 6 5 30 0 100 80',
1373 f
'M {Phase.Event} 0 1 0 {incr(t)}',
1374 f
'M {Phase.Event} 1 1 0 {incr(t)}',
1375 f
'm {Phase.Event} 1 1 0 {incr(t)} 3 2 20 0 50 25',
1376 f
'm {Phase.Event} 0 1 0 {incr(t)} 3 2 20 0 50 25',
1377 f
'f {Phase.Event} 0 1 1 1 {incr(t)}',
1378 f
'f {Phase.Event} 1 1 1 2 {incr(t)}'])
◆ testContainers()
def edmModuleAllocMonitorAnalyze.TestModuleCommand.testContainers |
( |
|
self | ) |
|
Definition at line 1389 of file edmModuleAllocMonitorAnalyze.py.
1389 def testContainers(self):
1390 c = VisualizationContainers()
1392 self.assertEqual(len(c.allGlobals()), 3)
1394 self.assertEqual(len(c.allStreams()), 3)
1395 slot = c.findOpenSlotInModGlobals(2, 1)
1396 self.assertEqual(len(c._modGlobals),3)
1397 self.assertEqual(len(slot),0)
1398 slot.append({
"start":1,
"finish":0,
"id":1})
1400 return item[
"id"]==1
1401 item,s = c.findLastInModGlobals(2, 1, testFind)
1402 self.assertEqual(item[
"id"],1)
1403 self.assertEqual(slot,s)
1404 slot = c.findOpenSlotInModStreams(2, 1)
1405 self.assertEqual(len(c._modStreams),3)
1406 self.assertEqual(len(slot),0)
1407 slot.append({
"start":1,
"finish":0,
"id":1})
1408 item,s = c.findLastInModStreams(2, 1, testFind)
1409 self.assertEqual(item[
"id"],1)
1410 self.assertEqual(slot,s)
◆ testFullVisualization()
def edmModuleAllocMonitorAnalyze.TestModuleCommand.testFullVisualization |
( |
|
self | ) |
|
Definition at line 1430 of file edmModuleAllocMonitorAnalyze.py.
References edmModuleAllocMonitorAnalyze.jsonVisualizationInfo(), edmTracerCompactLogViewer.TestModuleCommand.tracerFile, and edmModuleAllocMonitorAnalyze.TestModuleCommand.tracerFile.
1430 def testFullVisualization(self):
1431 parser = ModuleAllocCompactFileParser(self.tracerFile,
False)
1434 self.assertEqual(len(j[
"modules"]), 2)
1435 self.assertEqual(len(j[
"esModules"]), 2)
1436 self.assertEqual(len(j[
'transitions']), 3)
1437 self.assertEqual(j[
'transitions'][0][
'name'],
"Global")
1438 self.assertEqual(j[
'transitions'][1][
'name'],
"Stream 0")
1439 self.assertEqual(j[
'transitions'][2][
'name'],
"Stream 1")
1440 self.assertEqual(len(j[
"transitions"][0][
"slots"]), 2)
1441 self.assertEqual(len(j[
"transitions"][0][
"slots"][0]), 11)
1442 self.assertEqual(len(j[
"transitions"][0][
"slots"][1]), 4)
1443 self.assertEqual(len(j[
"transitions"][1][
"slots"]), 2)
1444 self.assertEqual(len(j[
"transitions"][1][
"slots"][0]), 5)
1445 self.assertEqual(len(j[
"transitions"][1][
"slots"][1]), 3)
1446 self.assertEqual(len(j[
"transitions"][2][
"slots"]), 2)
1447 self.assertEqual(len(j[
"transitions"][2][
"slots"][0]), 5)
1448 self.assertEqual(len(j[
"transitions"][2][
"slots"][1]), 2)
def jsonVisualizationInfo(parser)
◆ testJson()
def edmModuleAllocMonitorAnalyze.TestModuleCommand.testJson |
( |
|
self | ) |
|
◆ testJsonTemporal()
def edmModuleAllocMonitorAnalyze.TestModuleCommand.testJsonTemporal |
( |
|
self | ) |
|
◆ testModuleCentricVisualization()
def edmModuleAllocMonitorAnalyze.TestModuleCommand.testModuleCentricVisualization |
( |
|
self | ) |
|
Definition at line 1449 of file edmModuleAllocMonitorAnalyze.py.
References edmModuleAllocMonitorAnalyze.jsonVisualizationInfo(), edmTracerCompactLogViewer.TestModuleCommand.tracerFile, and edmModuleAllocMonitorAnalyze.TestModuleCommand.tracerFile.
1449 def testModuleCentricVisualization(self):
1450 parser = ModuleAllocCompactFileParser(self.tracerFile,
True)
1453 self.assertEqual(len(j[
"modules"]), 2)
1454 self.assertEqual(len(j[
"esModules"]), 2)
1455 self.assertEqual(len(j[
'transitions']), 6)
1456 self.assertEqual(j[
'transitions'][0][
'name'],
"Global")
1457 self.assertEqual(j[
'transitions'][1][
'name'],
"Stream 0")
1458 self.assertEqual(j[
'transitions'][2][
'name'],
"Stream 1")
1459 self.assertEqual(j[
'transitions'][3][
'name'],
"source")
1460 self.assertEqual(j[
'transitions'][4][
'name'],
"Module")
1461 self.assertEqual(j[
'transitions'][5][
'name'],
"ESModule")
1462 self.assertEqual(len(j[
"transitions"][0][
"slots"]), 1)
1463 self.assertEqual(len(j[
"transitions"][0][
"slots"][0]), 11)
1464 self.assertEqual(len(j[
"transitions"][1][
"slots"]), 1)
1465 self.assertEqual(len(j[
"transitions"][1][
"slots"][0]), 5)
1466 self.assertEqual(len(j[
"transitions"][2][
"slots"]), 1)
1467 self.assertEqual(len(j[
"transitions"][2][
"slots"][0]), 5)
1468 self.assertEqual(len(j[
"transitions"][4][
"slots"]), 2)
1469 self.assertEqual(len(j[
"transitions"][4][
"slots"][0]), 7)
1470 self.assertEqual(len(j[
"transitions"][4][
"slots"][1]), 1)
1471 self.assertTrue(j[
"transitions"][4][
"slots"][1][-1][
'finish'] != 0.0)
1472 self.assertEqual(len(j[
"transitions"][5][
"slots"]), 1)
1473 self.assertEqual(len(j[
"transitions"][5][
"slots"][0]), 1)
def jsonVisualizationInfo(parser)
◆ testSortBy()
def edmModuleAllocMonitorAnalyze.TestModuleCommand.testSortBy |
( |
|
self | ) |
|
◆ testSyncValues()
def edmModuleAllocMonitorAnalyze.TestModuleCommand.testSyncValues |
( |
|
self | ) |
|
Definition at line 1381 of file edmModuleAllocMonitorAnalyze.py.
1381 def testSyncValues(self):
1384 self.assertEqual(s.runFor(0), 1)
1386 self.assertEqual(s.lumiFor(0), (1,1))
1387 s.setStream(1, 1,1,3)
1388 self.assertEqual(s.streamFor(1), (1,1,3))
◆ tracerFile
edmModuleAllocMonitorAnalyze.TestModuleCommand.tracerFile |