示例#1
0
 def test1(self):
     # test that entries record is correct
     classifier = Classifier()
     self.assertIn("063.000.000", self.records)
     entries, total, updates = \
         classifier.classify(self.records["063.000.000"])
     rec = entries[0]
     self.assertEqual(rec.condorId, "063.000.000")
     self.assertEqual(rec.dagNode, "A2")
     self.assertEqual(utcTzLocal(rec.submitTime),
                      addTzLocal("2016-10-17 19:59:57"))
     self.assertEqual(rec.executionHost, "141.142.225.136:41156")
     self.assertEqual(utcTzLocal(rec.executionStartTime),
                      addTzLocal("2016-10-17 20:00:04"))
     self.assertEqual(utcTzLocal(rec.executionStopTime),
                      addTzLocal("2016-10-17 20:00:14"))
     self.assertEqual(rec.updateImageSize, 414300)
     self.assertEqual(rec.updateMemoryUsageMb, 81)
     self.assertEqual(rec.updateResidentSetSizeKb, 81996)
     self.assertEqual(rec.userRunRemoteUsage, 1)
     self.assertEqual(rec.sysRunRemoteUsage, 1)
     self.assertEqual(rec.finalDiskUsageKb, 59)
     self.assertEqual(rec.finalDiskRequestKb, 59)
     self.assertEqual(rec.finalMemoryUsageMb, 81)
     self.assertEqual(rec.finalMemoryRequestMb, 81)
     self.assertEqual(rec.bytesSent, 25595)
     self.assertEqual(rec.bytesReceived, 1449)
     self.assertEqual(utcTzLocal(rec.terminationTime),
                      addTzLocal("2016-10-17 20:00:14"))
     self.assertEqual(rec.terminationCode, recordslib.terminated.eventCode)
示例#2
0
 def test7(self):
     # check validity of job aborted record
     self.assertIn("244585.000.000", self.records)
     rec = self.records["244585.000.000"][5]
     self.assertEqual(rec.__class__.__name__, "Aborted")
     self.assertEqual(utcTzLocal(rec.utctimestamp),
                      addTzLocal("2016-08-20 13:12:55"))
     self.assertEqual(rec.reason, "via condor_rm (by user srp)")
示例#3
0
 def test7(self):
     # check validity of job aborted record
     self.assertIn("244585.000.000", self.records)
     rec = self.records["244585.000.000"][5]
     self.assertEqual(rec.__class__.__name__, "Aborted")
     self.assertEqual(utcTzLocal(rec.utctimestamp),
                      addTzLocal("2016-08-20 13:12:55"))
     self.assertEqual(rec.reason, "via condor_rm (by user srp)")
示例#4
0
 def test4(self):
     # check validity of first Updated record
     self.assertIn("254504.000.000", self.records)
     rec = self.records["254504.000.000"][2]
     self.assertEqual(rec.__class__.__name__, "Updated")
     self.assertEqual(rec.event, recordslib.updated.eventCode)
     self.assertEqual(rec.imageSize, 467144)
     self.assertEqual(rec.memoryUsageMb, 10)
     self.assertEqual(rec.residentSetSizeKb, 9360)
     self.assertEqual(utcTzLocal(rec.utctimestamp),
                      addTzLocal("2016-08-21 10:27:31"))
示例#5
0
 def test4(self):
     # check validity of first Updated record
     self.assertIn("254504.000.000", self.records)
     rec = self.records["254504.000.000"][2]
     self.assertEqual(rec.__class__.__name__, "Updated")
     self.assertEqual(rec.event, recordslib.updated.eventCode)
     self.assertEqual(rec.imageSize, 467144)
     self.assertEqual(rec.memoryUsageMb, 10)
     self.assertEqual(rec.residentSetSizeKb, 9360)
     self.assertEqual(utcTzLocal(rec.utctimestamp),
                      addTzLocal("2016-08-21 10:27:31"))
示例#6
0
 def test6(self):
     # check validity of Terminated record
     self.assertIn("244585.000.000", self.records)
     rec = self.records["244585.000.000"][4]
     self.assertEqual(rec.__class__.__name__, "Evicted")
     self.assertEqual(rec.event, recordslib.evicted.eventCode)
     self.assertEqual(rec.memoryRequest, 1)
     self.assertEqual(rec.memoryUsage, 41)
     self.assertEqual(rec.runBytesReceived, 0)
     self.assertEqual(rec.runBytesSent, 0)
     self.assertEqual(utcTzLocal(rec.utctimestamp),
                      addTzLocal("2016-08-20 13:12:55"))
     self.assertEqual(rec.userRunLocalUsage, 0)
     self.assertEqual(rec.userRunRemoteUsage, 0)
示例#7
0
 def test6(self):
     # check validity of Terminated record
     self.assertIn("244585.000.000", self.records)
     rec = self.records["244585.000.000"][4]
     self.assertEqual(rec.__class__.__name__, "Evicted")
     self.assertEqual(rec.event, recordslib.evicted.eventCode)
     self.assertEqual(rec.memoryRequest, 1)
     self.assertEqual(rec.memoryUsage, 41)
     self.assertEqual(rec.runBytesReceived, 0)
     self.assertEqual(rec.runBytesSent, 0)
     self.assertEqual(utcTzLocal(rec.utctimestamp),
                      addTzLocal("2016-08-20 13:12:55"))
     self.assertEqual(rec.userRunLocalUsage, 0)
     self.assertEqual(rec.userRunRemoteUsage, 0)
示例#8
0
 def test6(self):
     # check validity of Terminated record
     self.assertIn("254504.000.000", self.records)
     rec = self.records["254504.000.000"][4]
     self.assertEqual(rec.__class__.__name__, "Terminated")
     self.assertEqual(rec.event, recordslib.terminated.eventCode)
     self.assertEqual(rec.memoryRequest, 1)
     self.assertEqual(rec.memoryUsage, 10)
     self.assertEqual(rec.runBytesReceived, 0)
     self.assertEqual(rec.runBytesSent, 0)
     self.assertEqual(rec.sysRunLocalUsage, 0)
     self.assertEqual(rec.sysRunRemoteUsage, 0)
     self.assertEqual(rec.sysTotalLocalUsage, 0)
     self.assertEqual(rec.sysTotalRemoteUsage, 0)
     self.assertEqual(utcTzLocal(rec.utctimestamp),
                      addTzLocal("2016-08-21 10:29:43"))
     self.assertEqual(rec.totalBytesReceived, 0)
     self.assertEqual(rec.totalBytesSent, 0)
     self.assertEqual(rec.userRunLocalUsage, 0)
     self.assertEqual(rec.userRunRemoteUsage, 0)
     self.assertEqual(rec.userTotalLocalUsage, 0)
     self.assertEqual(rec.userTotalRemoteUsage, 0)
示例#9
0
    def test2(self):
        # see note about "year", above
        # test that total record is correct

        classifier = Classifier()
        self.assertIn("063.000.000", self.records)
        entries, total, updates = \
            classifier.classify(self.records["063.000.000"])
        self.assertEqual(utcTzLocal(total.firstSubmitTime),
                         addTzLocal("2016-10-17 19:59:57"))
        self.assertEqual(total.totalBytesSent, 25595)
        self.assertEqual(total.totalBytesReceived, 1449)
        self.assertEqual(total.submissions, 1)
        self.assertEqual(total.executions, 1)
        self.assertEqual(total.shadowException, 0)
        self.assertEqual(total.socketLost, 0)
        self.assertEqual(total.socketReconnectFailure, 0)
        self.assertEqual(total.socketReestablished, 0)
        self.assertEqual(total.evicted, 0)
        self.assertEqual(total.aborted, 0)
        self.assertEqual(total.slotsUsed, 1)
        self.assertEqual(total.hostsUsed, 1)
示例#10
0
 def test6(self):
     # check validity of Terminated record
     self.assertIn("254504.000.000", self.records)
     rec = self.records["254504.000.000"][4]
     self.assertEqual(rec.__class__.__name__, "Terminated")
     self.assertEqual(rec.event, recordslib.terminated.eventCode)
     self.assertEqual(rec.memoryRequest, 1)
     self.assertEqual(rec.memoryUsage, 10)
     self.assertEqual(rec.runBytesReceived, 0)
     self.assertEqual(rec.runBytesSent, 0)
     self.assertEqual(rec.sysRunLocalUsage, 0)
     self.assertEqual(rec.sysRunRemoteUsage, 0)
     self.assertEqual(rec.sysTotalLocalUsage, 0)
     self.assertEqual(rec.sysTotalRemoteUsage, 0)
     self.assertEqual(utcTzLocal(rec.utctimestamp),
                      addTzLocal("2016-08-21 10:29:43"))
     self.assertEqual(rec.totalBytesReceived, 0)
     self.assertEqual(rec.totalBytesSent, 0)
     self.assertEqual(rec.userRunLocalUsage, 0)
     self.assertEqual(rec.userRunRemoteUsage, 0)
     self.assertEqual(rec.userTotalLocalUsage, 0)
     self.assertEqual(rec.userTotalRemoteUsage, 0)
示例#11
0
 def assertTimeEqual(self, utctimestamp, dateString):
     self.assertEqual(utcTzLocal(utctimestamp), addTzLocal(dateString))
示例#12
0
 def assertTimeEqual(self, utctimestamp, dateString):
     self.assertEqual(utcTzLocal(utctimestamp), addTzLocal(dateString))