Changeset 32453 for trunk/ippToPsps
- Timestamp:
- Sep 26, 2011, 1:22:50 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/metrics.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/metrics.py
r32354 r32453 93 93 94 94 ''' 95 Prints various timing stats for this batch type 96 ''' 97 def printStats(batchType): 98 99 logger.info("| %2s | %16.1f | %13d | %17.1f | %16d | %14s |" % 100 (batchType, 101 ippToPspsDb.countBatchesInLastPeriod(batchType, EPOCH, DVOLABEL, "1 HOUR") / 1.0, 102 ippToPspsDb.countBatchesInLastPeriod(batchType, EPOCH, DVOLABEL, "24 HOUR"), 103 ippToPspsDb.countBatchesInLastPeriod(batchType, EPOCH, DVOLABEL, "1 WEEK") / 7.0, 104 ippToPspsDb.getTotalDetectionsPublished(batchType, EPOCH, DVOLABEL), 105 ippToPspsDb.getTimeOfLastBatchPublished(batchType, EPOCH, DVOLABEL))) 106 107 ''' 95 108 Start of program. 96 109 ''' … … 119 132 logger.infoPair("Loading epoch", EPOCH) 120 133 logger.infoPair("DVO label", DVOLABEL) 121 logger.infoPair("P2 batches per hour", "%.1f" % ippToPspsDb.getBatchesPerHour("P2", EPOCH, DVOLABEL, 2)) 122 logger.infoPair("ST batches per hour", "%.1f" % ippToPspsDb.getBatchesPerHour("ST", EPOCH, DVOLABEL, 2)) 123 logger.infoPair("Last P2 batch published", ippToPspsDb.getTimeOfLastBatchPublished("P2", EPOCH, DVOLABEL)) 124 logger.infoPair("Last ST batch published", ippToPspsDb.getTimeOfLastBatchPublished("ST", EPOCH, DVOLABEL)) 134 135 logger.info("+----+------------------+---------------+-------------------+------------------+----------------+") 136 logger.info("|Type| batches per hour | last 24 hours | per day this week | total detections | last published |") 137 logger.info("+----+------------------+---------------+-------------------+------------------+----------------+") 138 printStats("P2") 139 printStats("ST") 140 logger.info("+----+------------------+---------------+-------------------+------------------+----------------+") 141 125 142 logger.info("") 126 143
Note:
See TracChangeset
for help on using the changeset viewer.
