Skip to content

Add approximate execution time on the result panel header #17

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

Merged
merged 2 commits into from
May 7, 2025

Conversation

edmocosta
Copy link
Collaborator

Added the configuration execution time (milliseconds) on the result panel header, so users can compare their approximate execution time and roughly compare their efficiency.

Screenshot 2025-05-08 at 00 14 40

@edmocosta edmocosta closed this May 7, 2025
@edmocosta edmocosta reopened this May 7, 2025
@edmocosta edmocosta requested a review from Copilot May 7, 2025 22:42
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds an approximate execution time display to the result panel header so that users can compare execution efficiency alongside the results.

  • Updated state initialization style in playground.js.
  • Added new CSS and HTML markup in the result panel for displaying execution time.
  • Extended error and execution result tests in ottlplayground_test.go and updated the execution result flow in ottlplayground.go.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
web/src/components/playground.js Improved code style with consistent semicolon and arrow function usage.
web/src/components/panels/result-panel.styles.js Added a new style block for the execution time header.
web/src/components/panels/result-panel.js Inserted UI component for showing execution time in the header.
wasm/internal/ottlplayground_test.go Updated tests to validate the inclusion and value of executionTime.
wasm/internal/ottlplayground.go Modified functions to propagate the executionTime measurement.

@edmocosta edmocosta requested a review from Copilot May 7, 2025 22:45
Copilot

This comment was marked as duplicate.

@edmocosta edmocosta force-pushed the add-execution-time-header branch from 02b7580 to 20973a0 Compare May 7, 2025 22:48
@edmocosta edmocosta merged commit 26141aa into main May 7, 2025
2 checks passed
@edmocosta edmocosta deleted the add-execution-time-header branch May 7, 2025 22:51
@edmocosta
Copy link
Collaborator Author

Thank you for the suggestion, @jaronoff97 :)
Although it's not precise compared to running it within the Collector, we can still use it to help improving the statements performance, for example, running this statement using a non-optimal OTTL context vs running the same statement using the most specific context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant