openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Mehrotra <chetan.mehro...@gmail.com>
Subject Re: Capturing Activation response size as part of User Events (#4660)
Date Mon, 07 Oct 2019 09:36:50 GMT
Any feedback on this would be helpful!

Chetan Mehrotra


On Thu, Oct 3, 2019 at 3:14 PM Chetan Mehrotra <chetan.mehrotra@gmail.com>
wrote:

> Hi  Team,
>
> I would like to capture the activation response size as part of user event
> data. This would allow us to understand the distribution of response size
> across various invocations. This would be useful input for the Activation
> Persister Service work (#4632)
>
> For this purpose a PR is opened (#4660) which captures the HTTP response
> string size and makes it part of `ActivationResponse` -> `WhiskActivation`
> -> `Activation` flow
>
> The size could have been computed at `Activation` level only but that
> would have added the overhead of serializing the response json object to
> json string. In current used approach the size is pre known when we
> construct the ActivationResponse
>
> Currently with this change a new numeric `size` attribute would get added
> to the `WhiskActivation` json representation which gets stored in db.
> Technically we can avoid making it part of persisted json as this value is
> only needed while constructing the `Activation` instance from in memory
> `WhiskActivation` instance
>
> Questions
>
> 1. Is current approach fine
> 2. Should we avoid persisting the size attribute
> 3. Or would it be ok to get size by converting the response to json string
> while constructing Activation instance in UserEvent flow
>
> Chetan Mehrotra
> [1] https://github.com/apache/openwhisk/pull/4632
> [2] https://github.com/apache/openwhisk/pull/4660
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message