-
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
base: master
Are you sure you want to change the base?
Conversation
…saction generation
… send timeout logic
… spans and remove Transaction inheritance
…performance monitoring capabilities
… performance monitoring settings
…performance and utility modules
…ormance monitoring structure
…ch sending method to use setTimeout
…ant for the token and remove unused transaction generation buttons for improved clarity and performance.
…for transactions. Update documentation and README to reflect new settings, including changes to transaction filtering criteria. Remove unused demo elements from example HTML for improved clarity.
…sistency and improving documentation clarity. Update comments to enhance understanding of methods and parameters.
…pan and Transaction classes, including descriptions for properties and methods. Remove unused types from performance module and update imports for better clarity and organization.
…readability. Adjust formatting for better alignment and clarity, and update import statements for consistency.
* | ||
* @param transaction - Transaction to queue | ||
*/ | ||
public queueTransaction(transaction: Transaction): void { |
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.
public queueTransaction(transaction: Transaction): void { | |
public enqueueTransaction(transaction: Transaction): void { |
if (this.sendQueue.length > 0) { | ||
void this.processSendQueue(); | ||
} | ||
} |
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.
sendRetires
should be cleared as well
* @param p - Percentile to calculate (e.g., 50 for median, 95 for 95th percentile) | ||
* @returns Percentile value | ||
*/ | ||
private percentile(sortedValues: number[], p: number): number { |
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.
move to util, please
* @param p - Percentile to calculate (e.g., 50 for median, 95 for 95th percentile) | ||
* @returns Percentile value | ||
*/ | ||
private percentile(sortedValues: number[], p: number): number { |
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.
maybe sorting should be a part of this method?
* @param values - Array of numbers | ||
* @returns Average value | ||
*/ | ||
private average(values: number[]): number { |
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.
create utility
|
||
this.sendRetries.set(tx.id, retryCount); | ||
|
||
const shouldRetry = retryCount <= MAX_SEND_RETRIES; |
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.
I think retrying should be a part of Transport
/** | ||
* Queues this transaction for sending to the server | ||
*/ | ||
private queueForSending(): void { |
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.
private queueForSending(): void { | |
private enqueueForSending(): void { |
@@ -161,3 +161,154 @@ const hawk = new HawkCatcher({ | |||
|
|||
hawk.connectVue(Vue) | |||
``` | |||
|
|||
## Performance Monitoring | |||
|
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.
- explain what is Transaction and Span.
- move API Reference on the first place
- optimization explanation is a technical detail, so it should be placed after usage description
/** | ||
* Total number of transactions in this group | ||
*/ | ||
count: number; |
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.
move count under name
token: this.token, | ||
catcherType: 'performance', | ||
payload: { | ||
transactions, |
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.
lets rename to aggregatedTransactions
Performance Monitoring API
This PR adds a new Performance Monitoring API to track application performance metrics.
Features
API