anchor.diff:  -module(sequencer_performance_test_SUITE).
   -author("Krzysztof Trzepla").
   
  --include_lib("cluster_worker/include/modules/datastore/datastore.hrl").
   -include("modules/events/definitions.hrl").
   -include("proto/oneclient/client_messages.hrl").
   -include_lib("ctool/include/logging.hrl").
  
positive.code:     lists:foreach(fun({SeqNum, #client_message{message_stream = MsgStm}}) ->
          ?assertEqual(SeqNum, MsgStm#message_stream.sequence_number)
      end, lists:zip(lists:seq(0, MsgNum - 1), Msgs)),
  
      [send_time(SendTime, SendUnit), recv_time(RecvTime, RecvUnit),
          msg_per_sec(MsgNum, SendUs + RecvUs)].
  
negative.code:     ]}
  ]).
  route_message_should_work_for_multiple_streams(Config) ->
      [Worker | _] = Workers = ?config(op_worker_nodes, Config),
      MsgNum = ?config(msg_num, Config),
      StmNum = ?config(stm_num, Config),
  
      Msgs = [#message_stream{sequence_number = SeqNum} ||
          SeqNum <- lists:seq(0, MsgNum - 1)],
      RevSeqNums = lists:seq(MsgNum - 1, 0, -1),
  
      initializer:remove_pending_messages(),
      {ok, SessId} = session_setup(Worker),
  
      % Production of 'MsgNum' messages in random order belonging to 'StmsCount'
      % streams. Requests are routed through random workers.
  