noir-lang / vscode-noir

Apache License 2.0
6 stars 7 forks source link

feat: add opcodes profile information #45

Closed kobyhallx closed 9 months ago

kobyhallx commented 9 months ago

Adds Command (with codelens Profile and key binding shift+alt+ctrl+n p to invoke profile command in LSP and display results as line decoration at the end, eg. // 15 ACIR opcodes. More detailed information is available on hover of individual code fragment (span).

image

Part of feat: Expose Profile information in vscode https://github.com/noir-lang/noir/issues/3501

kobyhallx commented 9 months ago

Needs https://github.com/noir-lang/noir/pull/3496

signorecello commented 9 months ago

this is great, thanks @kobyhallx

TomAFrench commented 9 months ago

I'm not seeing any line decorations in vscode. It's instead throwing an error that window.activeTextEditor is undefined.

Edit: managed to fix this. There's not very good feedback in the case where the profiling codelens fails.

kobyhallx commented 9 months ago

Edit: managed to fix this. There's not very good feedback in the case where the profiling codelens fails.

Are you going to bring this fix back?