tom-pytel edited a comment on pull request #52:
URL: https://github.com/apache/skywalking-nodejs/pull/52#issuecomment-844083225
> In the code start case, is there any chance to separate the booting
process and request handling process? These are typical differences in most
cases I am familiar with. Or do you mean, this code starting begins after
receiving a request? I don't know this kind of case.
The `coldStart` tag doesn't really give information about the endpoint where
it applies in isolation but rather explains the slower than normal execution of
an upstream parent span which waits on this child. For one cold started child
alone there is no way to determine the length of the bootup since the span
starts once the boot is complete and in theory will execute more or less the
same as if it was not a cold start (except for any unfilled caches and things
like that). If you have both cold and non-cold versions of an endpoint with
their parent then you can estimate the time of bootup alone as shown below:
```
0 1 2 3 4
/parent +-------+
/child +---+
/parent +---------------+
/child<cold> +---+
child boot time = (/parent - /child<cold>) - (/parent - /child) = (4 - 1) -
(2 - 1) = 2
```
Of course you have to select the parent times which have cold vs. non-cold
children. The /child and /child<cold> are subtracted from /parent because they
MAY have statistically significant difference in execution time, but a simpler
form can just subtract parent times.
In any case this is just something we do on our side because someone
requested it, thought it might be useful info for your side as well.
--
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]