sergehuber commented on a change in pull request #85: [UNOMI-228] Replace user 
agent detector library
URL: https://github.com/apache/unomi/pull/85#discussion_r280974571
 
 

 ##########
 File path: 
plugins/request/src/main/java/org/apache/unomi/plugins/request/actions/SetRemoteHostInfoAction.java
 ##########
 @@ -150,14 +148,19 @@ public int execute(Action action, Event event) {
             logger.error("Cannot lookup IP", e);
         }
 
-        UserAgentStringParser parser = 
UADetectorServiceFactory.getResourceModuleParser();
-        ReadableUserAgent agent = 
parser.parse(httpServletRequest.getHeader("User-Agent"));
-        session.setProperty("operatingSystemFamily", 
agent.getOperatingSystem().getFamilyName());
-        session.setProperty("operatingSystemName", 
agent.getOperatingSystem().getName());
-        session.setProperty("userAgentName", agent.getName());
-        session.setProperty("userAgentVersion", 
agent.getVersionNumber().toVersionString());
+        UserAgentAnalyzer uaa = UserAgentAnalyzer
 
 Review comment:
   Actually I was thinking instead of JMeter tests we could have a quick 
looping test in a unit test that would time the first init and then verify that 
subsequent calls are fast. Similar to what was done in the expression 
evaluators here : 
https://github.com/apache/unomi/blob/master/plugins/baseplugin/src/test/java/org/apache/unomi/plugins/baseplugin/conditions/PropertyConditionEvaluatorTest.java
   
   Actually we also need to make those tests a little shorter and less 
aggressive because they are causing problems on some platforms (Windows)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to