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

Add gasProfile() method to run Move gas profiling #584

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0xmaayan
Copy link
Collaborator

Description

Test Plan

Related Links

Checklist

  • Have you ran pnpm fmt?
  • Have you updated the CHANGELOG.md?

@0xmaayan 0xmaayan requested a review from a team as a code owner November 18, 2024 22:40
Comment on lines +313 to +320
async gasProfile(args: {
network: string;
transactionId: string;
extraArguments?: Array<string>;
showStdout?: boolean;
}): Promise<{ output: string; result?: any }> {
const { network, transactionId, extraArguments, showStdout } = args;
const cliArgs = ["aptos", "move", "replay", "--profile-gas", "--network", network, "--txn-id", transactionId];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh interesting didn't know it works on historical transactions.

Maybe rename it to gasProfileExistingTransaction or something like that?

Or just leave room in this function to take a different input that also allows gas profiling new transactions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh interesting didn't know it works on historical transactions.

Maybe rename it to gasProfileExistingTransaction or something like that?

Or just leave room in this function to take a different input that also allows gas profiling new transactions.

hmm wdym? the command profiling a committed transaction

aptos move replay --profile-gas --help
Replay a comitted transaction using a local VM

Usage: aptos move replay [OPTIONS] --network <NETWORK> --txn-id <TXN_ID>

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.

2 participants