-
Notifications
You must be signed in to change notification settings - Fork 3
feat(perf): Add performance measuring api #117
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
Open
TatianaFomina
wants to merge
38
commits into
master
Choose a base branch
from
feat/perf
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
c022264
Implement perf events
TatianaFomina 0bc0093
feat(performance): enhance performance monitoring with batch sending …
TatianaFomina 767592b
Lint
TatianaFomina ab1ab01
Upd
TatianaFomina 751a048
Upd
TatianaFomina 5daeb4e
Upd api
TatianaFomina b5d71c4
Remove traceId
TatianaFomina d708ebb
feat(performance): add performance monitoring
TatianaFomina 1c7a123
feat(performance): enhance performance monitoring configuration and s…
TatianaFomina 2cabdaa
feat(performance): add performance monitoring settings demo with tran…
TatianaFomina a0d56bb
refactor(performance): simplify transaction queuing and remove unused…
TatianaFomina 933f7f9
refactor(performance): update PerformancePayload interface to include…
TatianaFomina 6c544bd
Lint
TatianaFomina 8309ae3
Fix
TatianaFomina d611f1d
Review
TatianaFomina 2459f5d
feat(performance): introduce batch sending configuration and enhance …
TatianaFomina c1639ca
feat(performance): add batch interval configuration and update UI for…
TatianaFomina c8b37bc
style: clean up code formatting and remove unnecessary whitespace in …
TatianaFomina 1e57084
chore(performance): remove debugger statement from startTransaction m…
TatianaFomina 8e8d0f7
Split
TatianaFomina efa12f9
Review
TatianaFomina 677fdaf
feat(performance): update HawkCatcher initialization and enhance perf…
TatianaFomina 1f1e758
fix(performance): correct transaction length reference and update bat…
TatianaFomina 93fd56c
Add doc
TatianaFomina 846e864
Update performance-monitoring.md
neSpecc e510e2a
Update performance-monitoring.md
neSpecc cefde4d
Update performance-monitoring.md
neSpecc e6885ca
Update performance-monitoring.md
neSpecc 366ca89
Update respectively to docs
TatianaFomina 936da97
Upd
TatianaFomina 6ffcf16
Update readme
TatianaFomina e007868
Refactor HawkCatcher initialization in monitoring.html to use a const…
TatianaFomina bbc9cea
Merge branch 'master' into feat/perf
TatianaFomina f11bdd1
Enhance performance monitoring by adding critical duration threshold …
TatianaFomina c4f0094
Refactor performance monitoring code by adding missing commas for con…
TatianaFomina e5a32ca
Add retries
TatianaFomina 17c44f5
Enhance performance monitoring by adding detailed documentation for S…
TatianaFomina 61649a9
Refactor consoleCatcher and performance monitoring code for improved …
TatianaFomina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,6 +84,60 @@ | |
| font-size: 15px; | ||
| color:inherit; | ||
| } | ||
|
|
||
| .performance-demo { | ||
| border-radius: 4px; | ||
| } | ||
|
|
||
| .performance-demo button { | ||
| padding: 8px 16px; | ||
| padding-right: 32px; | ||
| background: #4979E4; | ||
| color: white; | ||
| border: none; | ||
| border-radius: 4px; | ||
| cursor: pointer; | ||
| position: relative; | ||
| min-width: 200px; | ||
| text-align: left; | ||
| } | ||
|
|
||
| .performance-demo button:hover { | ||
| background: #4869d2; | ||
| } | ||
|
|
||
| .performance-demo button[disabled] { | ||
| background: #4979E4; | ||
| opacity: 0.7; | ||
| cursor: not-allowed; | ||
| } | ||
|
|
||
| .performance-demo button .spinner { | ||
| display: none; | ||
| width: 10px; | ||
| height: 10px; | ||
| border: 2px solid #fff; | ||
| border-bottom-color: transparent; | ||
| border-radius: 50%; | ||
| animation: rotation 1s linear infinite; | ||
| position: absolute; | ||
| right: 10px; | ||
| top: 50%; | ||
| margin-top: -5px; | ||
| } | ||
|
|
||
| .performance-demo button[disabled] .spinner { | ||
| display: block; | ||
| } | ||
|
|
||
| @keyframes rotation { | ||
| from { | ||
| transform: rotate(0deg); | ||
| } | ||
| to { | ||
| transform: rotate(360deg); | ||
| } | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
|
|
@@ -152,7 +206,17 @@ <h2>Test console catcher</h2> | |
| <br><br> | ||
| <button id="btn-console-test">Make</button> | ||
| </section> | ||
| <script src="https://unpkg.com/vue@2"></script> | ||
| <section> | ||
| <h2>Performance Monitoring Demo</h2> | ||
| <div class="performance-demo"> | ||
| <button id="simulateComplexOperation"> | ||
| Simulate Complex Operation | ||
| <span class="spinner"></span> | ||
| </button> | ||
| </div> | ||
| </section> | ||
| <!-- <script src="https://unpkg.com/vue@2"></script> --> | ||
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script> | ||
| <section> | ||
| <h2>Test Vue integration: $root</h2> | ||
| <div id="vue-app-1"> | ||
|
|
@@ -196,7 +260,7 @@ <h2>Test Vue integration: <test-component></h2> | |
| el: tag, | ||
| instance: new Editor(), | ||
| classProto: Editor, | ||
| longText: 'Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.', | ||
| longText: 'Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.Upvoting this, given it\'s simplicity. In my use case I need to check all the attributes in an object for dodgy values-NaNs, nulls, undefined (they were points on a graph and these values prevented the graph from drawing). To get the value instead of the name, in the loop you would just do obj[someVariable]. Perhaps the reason it was downvoted so much is because it is not recursive. So this would not be an adequate solution if you have a highly structured object.', | ||
| } | ||
| }, | ||
| props: { | ||
|
|
@@ -236,5 +300,31 @@ <h2>Test Vue integration: <test-component></h2> | |
| }, | ||
| }) | ||
| </script> | ||
| <script> | ||
| // Simulate complex operation with nested spans | ||
| document.getElementById('simulateComplexOperation').addEventListener('click', () => { | ||
| const button = document.getElementById('simulateComplexOperation'); | ||
| button.disabled = true; | ||
|
|
||
| const transaction = window.hawk.startTransaction('complex-operation', { | ||
| type: 'background' | ||
| }); | ||
|
|
||
| const step1 = window.hawk.startSpan(transaction.id, 'step-1'); | ||
| setTimeout(() => { | ||
| window.hawk.finishSpan(step1.id); | ||
|
|
||
| const step2 = window.hawk.startSpan(transaction.id, 'step-2'); | ||
| // Simulate unfinished span | ||
|
|
||
| const step3 = window.hawk.startSpan(transaction.id, 'step-3'); | ||
| setTimeout(() => { | ||
| window.hawk.finishSpan(step3.id); | ||
| window.hawk.finishTransaction(transaction.id); | ||
| button.disabled = false; | ||
| }, 300); | ||
| }, 400); | ||
| }); | ||
| </script> | ||
| </body> | ||
| </html> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.