gaogaotiantian/viztracer

`log_sparce` works the other way around

AlexeyKozhevin opened this issue · 0 comments

log_sparce works the other way around: f and h are in log but g is not

import time
from viztracer import log_sparse, VizTracer

def f():
    time.sleep(1)

@log_sparse
def g():
    time.sleep(1)

def h():
    time.sleep(1)

with VizTracer(output_file="optional.json", log_sparse=True) as tracer:
    f(); g(); h()
image

Versions:

  • Python 3.8.16
  • viztracer==0.15.6