예제 #1
0
def save_statistics(session, start, end, stats):
    for tid in stats:
        newstat = Stats()
        newstat.tid = tid
        newstat.start = start
        newstat.summary = stats[tid]
        session.add(newstat)
예제 #2
0
def save_statistics(store, start, end, activity_collection):
    newstat = Stats()
    newstat.start = start
    newstat.summary = dict(activity_collection)
    newstat.free_disk_space = get_workingdir_space()[0]
    store.add(newstat)

    if activity_collection:
        log.debug("save_statistics: Saved statistics %s collected from %s to %s" %
                  (activity_collection, start, end))
예제 #3
0
def save_statistics(store, start, end, activity_collection):
    newstat = Stats()
    newstat.start = start
    newstat.summary = dict(activity_collection)
    newstat.free_disk_space = get_workingdir_space()[0]
    store.add(newstat)

    if activity_collection:
        log.debug("save_statistics: Saved statistics %s collected from %s to %s" %
                  (activity_collection, start, end))
예제 #4
0
def save_statistics(session, start, end, stats):
    for tid in stats:
        if not stats[tid]:
            # avoid to save empty stats
            continue

        newstat = Stats()
        newstat.tid = tid
        newstat.start = start
        newstat.summary = stats[tid]
        session.add(newstat)
예제 #5
0
def save_statistics(session, start, end, stats):
    for tid in stats:
        if not stats[tid]:
            # avoid to save empty stats
            continue

        newstat = Stats()
        newstat.tid = tid
        newstat.start = start
        newstat.summary = stats[tid]
        session.add(newstat)
예제 #6
0
def save_statistics(store, start, end, activity_collection):
    newstat = Stats()

    if activity_collection:
        log.debug("save_statistics: Saved statistics %s collected from %s to %s" %
                  (activity_collection, start, end))

    newstat.start = start
    newstat.summary = dict(activity_collection)
    newstat.free_disk_space = ResourceChecker.get_free_space()

    store.add(newstat)
예제 #7
0
def save_statistics(store, start, end, activity_collection):

    newstat = Stats()

    if activity_collection:
        log.debug("since %s to %s I've collected: %s" %
                  (start, end, activity_collection) )

    newstat.start = start
    newstat.summary = dict(activity_collection)
    newstat.freemb = ResourceChecker.get_free_space()

    store.add(newstat)
예제 #8
0
def save_statistics(store, start, end, activity_collection):
    newstat = Stats()
    newstat.start = start
    newstat.summary = dict(activity_collection)
    newstat.free_disk_space = get_workingdir_space()[0]
    store.add(newstat)
예제 #9
0
def acquire_statistics(store, anomalies_collection):
    newstat = Stats()
    newstat.content = dict(anomalies_collection)
    store.add(newstat)