anchor.diff:          {error, Reason} ->
               erlang:error({log_read_error, Reason})
       end.
  +
  +bench_finished(#{status:= failed}) -> true;
  +bench_finished(#{status:= complete}) -> true;
  +bench_finished(#{status:= stopped}) -> true;
  +bench_finished(#{status:= _}) -> false.
  
positive.code: 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
          end,
      Streamer = fun (Bin) -> cowboy_req:chunk(Bin, Request) end,
      ReadAtOnce = application:get_env(mzbench_api, bench_read_at_once, undefined),
  
negative.code: -module(mzb_api_endpoints).
  
  -export([init/2, info/3, terminate/3]).
  
  -include_lib("kernel/include/file.hrl").
  
  init(Req, _Opts) ->
      try
  