Skip to content

Commit

Permalink
Merge pull request #598 from msfm/upstream_UNDERTOW-1248
Browse files Browse the repository at this point in the history
UNDERTOW-1248 Add %{RESPONSE_TIME_MICROS} as a supported attribute
  • Loading branch information
stuartwdouglas committed Jan 2, 2018
2 parents 992b55e + 1ef3c40 commit aff98b5
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -32,6 +32,7 @@ public class ResponseTimeAttribute implements ExchangeAttribute {
public static final String RESPONSE_TIME_MILLIS_SHORT = "%D";
public static final String RESPONSE_TIME_SECONDS_SHORT = "%T";
public static final String RESPONSE_TIME_MILLIS = "%{RESPONSE_TIME}";
public static final String RESPONSE_TIME_MICROS = "%{RESPONSE_TIME_MICROS}";
public static final String RESPONSE_TIME_NANOS = "%{RESPONSE_TIME_NANOS}";

private final TimeUnit timeUnit;
Expand Down Expand Up @@ -83,6 +84,9 @@ public ExchangeAttribute build(String token) {
if (token.equals(RESPONSE_TIME_SECONDS_SHORT)) {
return new ResponseTimeAttribute(TimeUnit.SECONDS);
}
if(token.equals(RESPONSE_TIME_MICROS)) {
return new ResponseTimeAttribute(TimeUnit.MICROSECONDS);
}
if(token.equals(RESPONSE_TIME_NANOS)) {
return new ResponseTimeAttribute(TimeUnit.NANOSECONDS);
}
Expand Down

0 comments on commit aff98b5

Please sign in to comment.