module TypeFusion

def config

def config
  @config ||= Config.instance
  yield @config if block_given?
  @config
end

def start

def start
  return if Sampler.instance.trace.enabled?
  puts "[TypeFusion] Starting Sampler..."
  Sampler.instance.trace.enable
end

def stop

def stop
  return unless Sampler.instance.trace.enabled?
  puts "[TypeFusion] Stopping Sampler..."
  Sampler.instance.trace.disable
end

def with_sampling

def with_sampling
  start
  yield if block_given?
  stop
end