Browse files

implemented request tag logging to dumpfile

  • Loading branch information...
1 parent 4915bd2 commit 35b555ea5c1fcb2a59e692230714147e5472f87d @tisba tisba committed Oct 17, 2013
View
3 include/ts_config.hrl
@@ -76,7 +76,8 @@
total_popularity = 0, % should be 100 if we use probabilites; sum of all weights if we use weights
use_weights , % true if we use weights instead of probabilities
total_server_weights=0,
- job_notify_port
+ job_notify_port,
+ tag
}).
View
3 include/ts_http.hrl
@@ -52,7 +52,8 @@
digest_nc,
digest_qop,
realm,
- soap_action % for SOAP support
+ soap_action, % for SOAP support
+ tag % for tagged requests
}).
-record(url,
View
3 src/tsung/ts_http.erl
@@ -104,7 +104,8 @@ dump(protocol,{#ts_request{param=HttpReq},HttpResp,UserId,Server,Size,Duration,T
Data=ts_utils:join(";",[integer_to_list(UserId),
atom_to_list(HttpReq#http_request.method), Server,
get(last_url), Status,integer_to_list(Size),
- Duration,Tr,Match,Error]
+ Duration,Tr,Match,Error,
+ HttpReq#http_request.tag]
),
ts_mon:dump({protocol, self(), Data });
dump(_,_) ->
View
3 src/tsung_controller/ts_config.erl
@@ -673,7 +673,8 @@ parse(Element = #xmlElement{name=request, attributes=Attrs},
lists:foldl( fun(A,B) ->Type:parse_config(A,B) end,
Conf#config{curid=Id+1, cur_req_id=Id+1,
subst=SubstitutionFlag,
- match=[]
+ match=[],
+ tag=Tag
},
Element#xmlElement.content)
end;
View
3 src/tsung_controller/ts_config_http.erl
@@ -78,7 +78,8 @@ parse_config(Element = #xmlElement{name=http},
version = Version,
get_ims_date= Date,
content_type= ContentType,
- body = Contents},
+ body = Contents,
+ tag = Config#config.tag},
%% SOAP Support: Add SOAPAction header to the message
Request2 = case lists:keysearch(soap,#xmlElement.name,
Element#xmlElement.content) of
View
2 src/tsung_controller/ts_mon.erl
@@ -437,7 +437,7 @@ start_dump(State=#state{type=Type}) ->
?LOG("dump file opened, starting monitor~n",?INFO),
case Type of
protocol ->
- io:format(Stream,"#date;pid;id;http method;host;URL;HTTP status;size;duration;transaction;match;error~n",[]);
+ io:format(Stream,"#date;pid;id;http method;host;URL;HTTP status;size;duration;transaction;match;error;request tag~n",[]);
_ ->
ok
end,

0 comments on commit 35b555e

Please sign in to comment.