1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
| trace(first) -> code:ensure_loaded(te_tcp_handler), NumMatches = recon_trace:calls({te_tcp_handler, dispatch_msg, '_'}, 3, [{scope, local}]), io:format("~nNumMatches:~p~n", [NumMatches]), te_client:start(jake_ma_1), timer:sleep(3000), te_client:stop(jake_ma_1), recon_trace:clear(); trace(arity) -> recon_trace:calls({te_tcp_handler, dispatch_msg, 3}, 3, [{scope, local}]), te_client:start(jake_ma_1), timer:sleep(3000), te_client:stop(jake_ma_1), recon_trace:clear(); trace(args) -> MatchSpec = ets:fun2ms(fun({'_', '_', '_'}) -> ok end), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, 3, [{scope, local}]), te_client:start(jake_ma_1), te_client:enter_room(jake_ma_1, 1), timer:sleep(3000), te_client:stop(jake_ma_1), recon_trace:clear(); trace(args2) -> MatchSpec = ets:fun2ms(fun({enter_room, '_', '_'}) -> ok end), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, 3, [{scope, local}]), te_client:start(jake_ma_1), te_client:enter_room(jake_ma_1, 1), timer:sleep(3000), te_client:stop(jake_ma_1), recon_trace:clear(); trace(filter_heartbeat) -> MatchSpec = ets:fun2ms(fun({Event, '_', '_'}) when Event =/= heartbeat -> ok end), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, 3, [{scope, local}]), te_client:start(jake_ma_1), te_client:enter_room(jake_ma_1, 1), te_client:leave_room(jake_ma_1), timer:sleep(3000), te_client:stop(jake_ma_1), recon_trace:clear(); trace(return_trace) -> MatchSpec = ets:fun2ms(fun({Event, '_', '_'}) when Event =/= heartbeat -> return_trace() end), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, 10, [{scope, local}]), te_client:start(jake_ma_1), te_client:enter_room(jake_ma_1, 1), te_client:leave_room(jake_ma_1), timer:sleep(3000), te_client:stop(jake_ma_1), recon_trace:clear(); trace(time) -> MatchSpec = ets:fun2ms(fun({Event, '_', '_'}) when Event =/= heartbeat -> ok end), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, {2, 1000}, [{scope, local}]), te_client:start(jake_ma_1), te_client:enter_room(jake_ma_1, 1), timer:sleep(1000), te_client:leave_room(jake_ma_1), te_client:enter_room(jake_ma_1, 1), timer:sleep(1000), te_client:leave_room(jake_ma_1), timer:sleep(1000), te_client:stop(jake_ma_1), recon_trace:clear(); trace(time2) -> MatchSpec = ets:fun2ms(fun({Event, '_', '_'}) when Event =/= heartbeat -> ok end), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, {2, 1000}, [{scope, local}]), te_client:start(jake_ma_1), te_client:enter_room(jake_ma_1, 1), te_client:leave_room(jake_ma_1), te_client:enter_room(jake_ma_1, 1), te_client:leave_room(jake_ma_1), timer:sleep(3000), te_client:stop(jake_ma_1), recon_trace:clear(); trace(to_file) -> MatchSpec = ets:fun2ms(fun({Event, '_', '_'}) when Event =/= heartbeat -> ok end), {ok, IO} = file:open("trace_output.txt", [write]), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, 10, [{scope, local}, {io_server, IO}]), te_client:start(jake_ma_1), te_client:enter_room(jake_ma_1, 1), te_client:leave_room(jake_ma_1), te_client:enter_room(jake_ma_1, 1), te_client:leave_room(jake_ma_1), timer:sleep(3000), file:close(IO), te_client:stop(jake_ma_1), recon_trace:clear(); trace(record_print) -> MatchSpec = ets:fun2ms(fun({Event, '_', '_'}) when Event =/= heartbeat -> return_trace() end), recon_rec:import(te_tcp_handler), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, 10, [{scope, local}]), te_client:start(jake_ma_1), te_client:enter_room(jake_ma_1, 1), te_client:leave_room(jake_ma_1), timer:sleep(3000), recon_rec:clear(), te_client:stop(jake_ma_1), recon_trace:clear(); trace(record_print2) -> MatchSpec = ets:fun2ms(fun({Event, '_', '_'}) when Event =/= heartbeat -> return_trace() end), recon_rec:import(te_tcp_handler), recon_rec:limit(state, 4, [room_type]), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, 10, [{scope, local}]), te_client:start(jake_ma_1), te_client:enter_room(jake_ma_1, 1), te_client:leave_room(jake_ma_1), timer:sleep(3000), recon_rec:clear(), te_client:stop(jake_ma_1), recon_trace:clear(); trace(all_pid) -> MatchSpec = ets:fun2ms(fun({Event, '_', '_'}) when Event =/= heartbeat -> ok end), recon_rec:import(te_tcp_handler), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, 30, [{scope, local}]), te_client:loop_start(1000), te_client:enter_room(jake_ma_1, 1), te_client:leave_room(jake_ma_1), timer:sleep(3000), recon_rec:clear(), te_client:loop_stop(1000), recon_trace:clear(); trace(new_pid) -> MatchSpec = ets:fun2ms(fun({Event, '_', '_'}) when Event =/= heartbeat -> ok end), recon_rec:import(te_tcp_handler), te_client:loop_start(1000), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, 30, [{scope, local}, {pid, new}]), te_client:enter_room(jake_ma_1, 1), te_client:leave_room(jake_ma_1), timer:sleep(3000), recon_rec:clear(), te_client:loop_stop(1000), recon_trace:clear(); trace(new_pid2) -> MatchSpec = ets:fun2ms(fun({Event, '_', '_'}) when Event =/= heartbeat -> ok end), recon_rec:import(te_tcp_handler), te_client:loop_start(1000), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, 30, [{scope, local}, {pid, new}]), te_client:start(jake_ma_1001), te_client:enter_room(jake_ma_1001, 1), te_client:leave_room(jake_ma_1001), timer:sleep(3000), recon_rec:clear(), te_client:loop_stop(1001), recon_trace:clear(); trace(pid) -> MatchSpec = ets:fun2ms(fun({Event, '_', '_'}) when Event =/= heartbeat -> ok end), recon_rec:import(te_tcp_handler), te_client:loop_start(1000), te_client:start(jake_ma_1001), Pid = wait_name(jake_ma_1001_server), recon_trace:calls({te_tcp_handler, dispatch_msg, MatchSpec}, 30, [{scope, local}, {pid, Pid}]), te_client:enter_room(jake_ma_1001, 1), te_client:leave_room(jake_ma_1001), timer:sleep(3000), recon_rec:clear(), te_client:loop_stop(1001), recon_trace:clear().
|