Skip to content

Commit c9b2a70

Browse files
Add 3xx status codes to successful apdex calc
Solves slanatech#107
1 parent 2b9db69 commit c9b2a70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/swsReqResStats.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ SwsReqResStats.prototype.countResponse = function(code,codeclass,duration,clengt
5454
this.avg_res_clength = Math.floor(this.total_res_clength / this.responses);
5555

5656
// Apdex: https://en.wikipedia.org/wiki/Apdex
57-
if( codeclass=="success" ) {
57+
if( codeclass === "success" || codeclass === "redirect" ) {
5858
if (duration <= this.apdex_threshold) {
5959
this.apdex_satisfied++;
6060
} else if (duration <= (this.apdex_threshold * 4)) {

0 commit comments

Comments
 (0)