Commit 756de746d852b227ec4d752247011f97314c8f9b

Authored by Cédric RICARD
1 parent aff304f6

removing performance logs

Showing 1 changed file with 16 additions and 15 deletions   Show diff stats
calexium_lib/web/CXM_multihost_http_server.anubis
@@ -2260,7 +2260,7 @@ define One @@ -2260,7 +2260,7 @@ define One
2260 http_info(ip_addr,uri,headers,generate_tt), 2260 http_info(ip_addr,uri,headers,generate_tt),
2261 all_web_args, 2261 all_web_args,
2262 is_SSL(connection)), 2262 is_SSL(connection)),
2263 - print_delta("After page generation"); 2263 + //print_delta("After page generation");
2264 if answer_headers_body is (additional_headers,answer_body) then 2264 if answer_headers_body is (additional_headers,answer_body) then
2265 forget(reliable_write(connection, 2265 forget(reliable_write(connection,
2266 [ "HTTP/1.1 200 OK", crlf, 2266 [ "HTTP/1.1 200 OK", crlf,
@@ -2268,8 +2268,8 @@ define One @@ -2268,8 +2268,8 @@ define One
2268 format_headers(standard_headers_for_html(length(answer_body),charset(desc))), 2268 format_headers(standard_headers_for_html(length(answer_body),charset(desc))),
2269 format_headers(additional_headers), 2269 format_headers(additional_headers),
2270 crlf . 2270 crlf .
2271 - answer_body]));  
2272 - print_delta("After sending page") 2271 + answer_body]))
  2272 + //print_delta("After sending page")
2273 ) 2273 )
2274 else (send_file(desc, 2274 else (send_file(desc,
2275 connection, 2275 connection,
@@ -2281,8 +2281,9 @@ define One @@ -2281,8 +2281,9 @@ define One
2281 not_found then failure, 2281 not_found then failure,
2282 found(v) then success(v) 2282 found(v) then success(v)
2283 }, 2283 },
2284 - (One u) |-> before_send_file(desc)(all_web_args));  
2285 - print_delta("After sending file"))). 2284 + (One u) |-> before_send_file(desc)(all_web_args))
  2285 + //print_delta("After sending file")
  2286 + )).
2286 2287
2287 2288
2288 2289
@@ -2965,40 +2966,40 @@ define One @@ -2965,40 +2966,40 @@ define One
2965 Bool is_https, 2966 Bool is_https,
2966 DenialOfService dos 2967 DenialOfService dos
2967 ) = 2968 ) =
2968 - t0 <- (UTime)now; 2969 + //t0 <- (UTime)now;
2969 with start_time = (Int32)now, 2970 with start_time = (Int32)now,
2970 sttm <- start_time; 2971 sttm <- start_time;
2971 - println("Request time: " + format_http_date(start_time)); 2972 + //println("Request time: " + format_http_date(start_time));
2972 if dos is denial_of_service(mc_v,rld_v,hd_v,ad_v,ld_v,ra_v) then 2973 if dos is denial_of_service(mc_v,rld_v,hd_v,ad_v,ld_v,ra_v) then
2973 if remote_IP_address_and_port(connection.conn) is (ip_addr,port) then 2974 if remote_IP_address_and_port(connection.conn) is (ip_addr,port) then
2974 if read_request_line(connection,start_time+*rld_v,dos) is 2975 if read_request_line(connection,start_time+*rld_v,dos) is
2975 { 2976 {
2976 error(msg) then print(format(msg)), 2977 error(msg) then print(format(msg)),
2977 ok(request_line) then 2978 ok(request_line) then
2978 - print_delta("read_request_line"); 2979 + //print_delta("read_request_line");
2979 if read_http_headers(connection,start_time+*hd_v,dos) is 2980 if read_http_headers(connection,start_time+*hd_v,dos) is
2980 { 2981 {
2981 error(msg) then print(format(msg)), 2982 error(msg) then print(format(msg)),
2982 - ok(headers) then print_delta("read_http_headers"); 2983 + ok(headers) then //print_delta("read_http_headers");
2983 if get_site(headers,sites) is 2984 if get_site(headers,sites) is
2984 { 2985 {
2985 failure then unique, 2986 failure then unique,
2986 success(p) then if p is (host_name,desc) then 2987 success(p) then if p is (host_name,desc) then
2987 - print_delta("get_site"); 2988 + //print_delta("get_site");
2988 if get_body_size(headers) is 2989 if get_body_size(headers) is
2989 { 2990 {
2990 error(msg) then log_journal_msg(desc,format(msg)), 2991 error(msg) then log_journal_msg(desc,format(msg)),
2991 ok(body_size) then 2992 ok(body_size) then
2992 - print_delta("get_body_size"); 2993 + //print_delta("get_body_size");
2993 if read_http_body(connection,body_size,constant_byte_array(0,0),1000) is 2994 if read_http_body(connection,body_size,constant_byte_array(0,0),1000) is
2994 { 2995 {
2995 error(msg) then log_journal_msg(desc,format(msg)), 2996 error(msg) then log_journal_msg(desc,format(msg)),
2996 ok(body) then 2997 ok(body) then
2997 - print_delta("before send_answer"); 2998 + //print_delta("before send_answer");
2998 send_answer(host_name, desc,connection.conn, request_line, headers, body, 2999 send_answer(host_name, desc,connection.conn, request_line, headers, body,
2999 - make_generate_trust_ticket(dos));  
3000 - with duration = (UTime) now - *t0,  
3001 - println("Request duration: " + utime_to_string(duration)) 3000 + make_generate_trust_ticket(dos))
  3001 + //with duration = (UTime) now - *t0,
  3002 + //println("Request duration: " + utime_to_string(duration))
3002 //println("BufferRead duration: " + utime_to_string(*t1)); 3003 //println("BufferRead duration: " + utime_to_string(*t1));
3003 //println("next_char duration: " + utime_to_string(*t2)) 3004 //println("next_char duration: " + utime_to_string(*t2))
3004 } 3005 }