Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Add benchmark debuging codelens #1566

Merged
merged 2 commits into from
Mar 15, 2018
Merged

Conversation

harkal
Copy link
Contributor

@harkal harkal commented Mar 8, 2018

Sometimes it is useful to be able to step into and debug benchmarks. This pull request adds this codelen above benchmark functions.

@msftclas
Copy link

msftclas commented Mar 8, 2018

CLA assistant check
All CLA requirements met.

Copy link
Contributor

@ramya-rao-a ramya-rao-a left a comment

Choose a reason for hiding this comment

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

A lot of code here is similar to whats needed for the debug test codelens. Instead of repeating it, it would be better to pull the common code out of the promise creation

Also, merge from master branch. There was a fix to not match multiple functions of similar names. See 5eab209

@harkal
Copy link
Contributor Author

harkal commented Mar 15, 2018

@ramya-rao-a I pulled the code out to a single function that generates the command. Let me know if you like it this way, or you want it a member of the class or something.

@ramya-rao-a
Copy link
Contributor

We don't really need a function for this. We can have the config as a variable without args inside the getCodeLensForFunctions function. Then, append the right args inside the promise creations to create the debugTestCmd and debugBenchmarkCmd.

@harkal
Copy link
Contributor Author

harkal commented Mar 15, 2018

config and debugCmd would then need to be copied and then append args and title to the copies or all promises will share the last one. It didn't look that tighty with all the coping and replacing of keys. The function looked more easy to follow. I might find time to refactor it that way at some point, but for now I am afraid I am over my time quota for a quick contribution like this. But feel free to change it anyway you like, the important thing is to have the feature in as it's quite useful! :) Thanks!

@ramya-rao-a ramya-rao-a merged commit 30e5d6b into microsoft:master Mar 15, 2018
@harkal harkal deleted the debug-benchmarks branch March 16, 2018 10:35
@ramya-rao-a
Copy link
Contributor

@harkal This is now out in the latest update (0.6.78) to the Go extension. Thanks for the PR!

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

Successfully merging this pull request may close these issues.

3 participants