예제 #1
0
 def _save_run_ids(self, i, txn):
     for i in self.cur_snapshot:
         snap = Snapshot(txn=txn, collector_run=self.runref,
                         run_time=self.runref.last_run)
         if isinstance(i, list) or isinstance(i, tuple) or isinstance(i, set):
             snap.statistic_id = i[0]
             p_txn = Snapshot.objects.find_last_by_statistic_id(i[1])
             if p_txn is not None:
                 snap.parent_txn = p_txn.id
         else:
             snap.statistic_id = i
         snap.save()
예제 #2
0
 def _save_run_ids(self, i, txn):
     for i in self.cur_snapshot:
         snap = Snapshot(txn=txn,
                         collector_run=self.runref,
                         run_time=self.runref.last_run)
         if isinstance(i, list) or isinstance(i, tuple) or isinstance(
                 i, set):
             snap.statistic_id = i[0]
             p_txn = Snapshot.objects.find_last_by_statistic_id(i[1])
             if p_txn is not None:
                 snap.parent_txn = p_txn.id
         else:
             snap.statistic_id = i
         snap.save()
예제 #3
0
 def _save_txn(self, i, txn, run_time):
     collector_run = CollectorRun.objects.get_or_create(collector=i[0])[0]
     collector_run.save()
     cur_snapshot = i[2]
     for j in cur_snapshot:
         snap = Snapshot(txn=txn, collector_run=collector_run, run_time=run_time)
         if isinstance(j, list) or isinstance(j, tuple) or isinstance(j, set):
             snap.statistic_id = j[0]
             p_txn = Snapshot.objects.find_last_by_statistic_id(j[1])
             if p_txn is not None:
                 snap.parent_txn = p_txn.id
         else:
             snap.statistic_id = j
         snap.save()
예제 #4
0
 def _save_txn(self, i, txn, run_time):
     collector_run = CollectorRun.objects.get_or_create(collector=i[0])[0]
     collector_run.save()
     cur_snapshot = i[2]
     for j in cur_snapshot:
         snap = Snapshot(txn=txn,
                         collector_run=collector_run,
                         run_time=run_time)
         if isinstance(j, list) or isinstance(j, tuple) or isinstance(
                 j, set):
             snap.statistic_id = j[0]
             p_txn = Snapshot.objects.find_last_by_statistic_id(j[1])
             if p_txn is not None:
                 snap.parent_txn = p_txn.id
         else:
             snap.statistic_id = j
         snap.save()