Skip to content

Conversation

@jribbink
Copy link
Contributor

@jribbink jribbink commented Jan 10, 2026

Closes #2251

Description

Screenshot 2026-01-15 at 6 09 09 PM image image

For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@github-actions
Copy link

github-actions bot commented Jan 10, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2026

Codecov Report

❌ Patch coverage is 76.52174% with 54 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/transactions/profile.go 76.75% 30 Missing and 23 partials ⚠️
internal/util/util.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@jribbink jribbink force-pushed the jribbink/profile-cmd branch 3 times, most recently from 5e4599c to a63c33a Compare January 15, 2026 23:25
@jribbink jribbink changed the title Add profiling command Addflow cadence profile command Jan 16, 2026
@jribbink jribbink marked this pull request as ready for review January 16, 2026 01:58
@jribbink jribbink force-pushed the jribbink/profile-cmd branch from b9e0a97 to 9d57fba Compare January 16, 2026 02:22
@jribbink jribbink changed the title Addflow cadence profile command Add flow cadence profile command Jan 16, 2026
@chasefleming chasefleming requested a review from Copilot January 16, 2026 03:50
Copy link

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 a new flow cadence profile command that enables profiling of transaction execution on Flow networks. The command generates pprof-compatible profile data for analyzing transaction performance and resource usage.

Changes:

  • Implements transaction profiling functionality by replaying transactions using FVM with forked state
  • Adds comprehensive test coverage for validation, result formatting, and integration testing with local emulator
  • Increases gRPC timeout from 5 to 60 seconds to support profiling operations

Reviewed changes

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

File Description
internal/util/util.go Increases GetChainIDFromHost timeout to 60 seconds to accommodate profiling operations
internal/transactions/transactions.go Registers the new profile command with the transaction command group
internal/transactions/profile.go Core implementation of transaction profiling including FVM setup, state forking, and pprof export
internal/transactions/profile_test.go Comprehensive test suite covering validation, result formatting, and integration scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jribbink jribbink changed the title Add flow cadence profile command Add flow transactions profile command Jan 16, 2026
Copy link
Contributor

@janezpodhostnik janezpodhostnik left a comment

Choose a reason for hiding this comment

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

I tested it out and I love it. This is going to be such a big help!

@jribbink jribbink merged commit 81467b3 into master Jan 30, 2026
9 checks passed
@jribbink jribbink deleted the jribbink/profile-cmd branch January 30, 2026 20:29
@turbolent
Copy link
Member

Love this! ❤️

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.

Add a flow transactions profile <tx_id> command

5 participants