Пример #1
0
def sanity(counter):
    s_t = time.time()
    worker = get_scoop_env('worker_name')
    origin = get_scoop_env('worker_origin')
    freeorigin = get_scoop_env('worker_freeorigin')
    delta = time.time() - s_t
    if HAS_PSUTIL:
        affinity = psutil.Process(os.getpid()).get_cpu_affinity()
    else:
        affinity = None
    return counter, worker, origin, delta, affinity, freeorigin
Пример #2
0
def sanity(counter):
    s_t = time.time()
    worker = get_scoop_env('worker_name')
    origin = get_scoop_env('worker_origin')
    delta = time.time() - s_t
    return counter, worker, origin, delta
Пример #3
0
def sanity(counter):
    s_t = time.time()
    worker = get_scoop_env('worker_name')
    origin = get_scoop_env('worker_origin')
    delta = time.time() - s_t
    return counter, worker, origin, delta