anchor.diff:  stream_from_file(File, BenchId, Request) ->
       IsFinished =
           fun () ->
  -            case mzb_api_server:status(BenchId) of
  -                #{status:= failed} -> true;
  -                #{status:= complete} -> true;
  -                #{status:= stopped} -> true;
  -                #{status:= _} -> false
  -            end
  +            bench_finished(mzb_api_server:status(BenchId))
           end,
       Streamer = fun (Bin) -> cowboy_req:chunk(Bin, Request) end,
       ReadAtOnce = application:get_env(mzbench_api, bench_read_at_once, undefined),
  
positive.code: 
  handle(<<"GET">>, <<"/logs">>, Req) ->
      with_bench_id(Req, fun(Id) ->
          #{config:= Config} = mzb_api_server:status(Id),
          #{log_compression:= Compression} = Config,
          ContentEncoding =
              case Compression of
  
negative.code: -module(mzb_api_endpoints).
  
  -export([init/2, info/3, terminate/3]).
  
  -include_lib("kernel/include/file.hrl").
  
  init(Req, _Opts) ->
      try
  