{"action":"created","issue":{"url":"https://api.github.com/repos/gatling/gatling/issues/3461","repository_url":"https://api.github.com/repos/gatling/gatling","labels_url":"https://api.github.com/repos/gatling/gatling/issues/3461/labels{/name}","comments_url":"https://api.github.com/repos/gatling/gatling/issues/3461/comments","events_url":"https://api.github.com/repos/gatling/gatling/issues/3461/events","html_url":"https://github.com/gatling/gatling/issues/3461","id":322339244,"number":3461,"title":"Provide access to Session in transformResponse","user":{"login":"asaarilahti","id":8832826,"avatar_url":"https://avatars2.githubusercontent.com/u/8832826?v=4","gravatar_id":"","url":"https://api.github.com/users/asaarilahti","html_url":"https://github.com/asaarilahti","followers_url":"https://api.github.com/users/asaarilahti/followers","following_url":"https://api.github.com/users/asaarilahti/following{/other_user}","gists_url":"https://api.github.com/users/asaarilahti/gists{/gist_id}","starred_url":"https://api.github.com/users/asaarilahti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asaarilahti/subscriptions","organizations_url":"https://api.github.com/users/asaarilahti/orgs","repos_url":"https://api.github.com/users/asaarilahti/repos","events_url":"https://api.github.com/users/asaarilahti/events{/privacy}","received_events_url":"https://api.github.com/users/asaarilahti/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-11T15:29:55Z","updated_at":"2018-05-11T17:27:33Z","closed_at":"2018-05-11T17:27:33Z","author_association":"NONE","body":"Background:\r\nWe are testing a service which also calls other services. We would like to subtract the response times of these dependent services from the total response time Gatling sees. This would allow to test the service in somewhat isolated fashion, where slowdowns of dependent services would not be accounted to the service under test.\r\n\r\nWe can currently adjust the response end time by using transformResponse. However, to do the adjustment we would need to access data from the session. To my understanding that is not possible currently.\r\n\r\nI'd be happy to provide a PR, if a change to include the session would be welcome. I have currently a draft version, which just changes PartialFunction[Response, Response] to Function2[Response, Session, Response]. However, that won't be backwards compatible and will lose the benefits of a partial function. Couple of question related to that:\r\n- Should the change be kept backwards compatible with 2.3 (this would target 3.0)?\r\n- Does the proposed solution to use Function2 look ok, or would some other approach like a Trait be preferable?"},"comment":{"url":"https://api.github.com/repos/gatling/gatling/issues/comments/388430747","html_url":"https://github.com/gatling/gatling/issues/3461#issuecomment-388430747","issue_url":"https://api.github.com/repos/gatling/gatling/issues/3461","id":388430747,"user":{"login":"asaarilahti","id":8832826,"avatar_url":"https://avatars2.githubusercontent.com/u/8832826?v=4","gravatar_id":"","url":"https://api.github.com/users/asaarilahti","html_url":"https://github.com/asaarilahti","followers_url":"https://api.github.com/users/asaarilahti/followers","following_url":"https://api.github.com/users/asaarilahti/following{/other_user}","gists_url":"https://api.github.com/users/asaarilahti/gists{/gist_id}","starred_url":"https://api.github.com/users/asaarilahti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asaarilahti/subscriptions","organizations_url":"https://api.github.com/users/asaarilahti/orgs","repos_url":"https://api.github.com/users/asaarilahti/repos","events_url":"https://api.github.com/users/asaarilahti/events{/privacy}","received_events_url":"https://api.github.com/users/asaarilahti/received_events","type":"User","site_admin":false},"created_at":"2018-05-11T17:27:33Z","updated_at":"2018-05-11T17:27:33Z","author_association":"NONE","body":"At the end I think the use case is too special to warrant the change - closing."}}
{"actor":{"display_login":"asaarilahti"}}