Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expressions timings in the browser console #78885

Closed

Conversation

wylieconlon
Copy link
Contributor

This is a PR that lets you see how many milliseconds each expression function takes, for visualize, lens, and canvas. For example:

Screen Shot 2020-09-29 at 6 40 04 PM

@wylieconlon wylieconlon added the Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) label Sep 29, 2020
@kibanamachine
Copy link
Contributor

kibanamachine commented Sep 29, 2020

💔 Build Failed

Failed CI Steps


Test Failures

Jest Tests.src/plugins/expressions/common/execution.Execution debug mode when functions succeed stores output of each function

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: expect(received).toEqual(expected) // deep equality

Expected: {"type": "num", "value": 0}
Received: undefined
    at Object.test (/dev/shm/workspace/parallel/5/kibana/src/plugins/expressions/common/execution/execution.test.ts:546:40)

Jest Tests.src/plugins/expressions/common/execution.Execution debug mode when functions succeed stores resolved arguments of a function

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: expect(received).toEqual(expected) // deep equality

Expected: {"val": 5}
Received: undefined
    at Object.test (/dev/shm/workspace/parallel/5/kibana/src/plugins/expressions/common/execution/execution.test.ts:571:38)

Jest Tests.src/plugins/expressions/common/execution.Execution debug mode when functions succeed store debug information about sub-expressions

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: expect(received).toBe(expected) // Object.is equality

Expected: 0
Received: undefined
    at Object.test (/dev/shm/workspace/parallel/5/kibana/src/plugins/expressions/common/execution/execution.test.ts:601:40)

Metrics [docs]

async chunks size

id value diff baseline
canvas 1.4MB +959.0B 1.4MB
lens 995.6KB +11.0B 995.6KB
total +970.0B

page load bundle size

id value diff baseline
expressions 205.2KB +1.0KB 204.2KB
lens 139.6KB +11.0B 139.6KB
visualizations 272.7KB +22.0B 272.7KB
total +1.0KB

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@ppisljar
Copy link
Member

how is this different from passing debug parameter to createExecution ?

  • not logging anything else but execution times ... that seems useful, but could be made configurable on the original createExecution debug parameter

is there something i am missing ?

@wylieconlon
Copy link
Contributor Author

@ppisljar This PR is the first step towards a "debug timing collector", there's a separate PR which lets us enable debug mode from client apps like Lens and Canvas. This is a separate chunk of work that could let us track and report on timing in an automated way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants