{"id":25843051,"url":"https://github.com/reinoutww/queryperf-vs-extension-codelens","last_synced_at":"2026-06-05T22:31:48.624Z","repository":{"id":279806357,"uuid":"939652909","full_name":"ReinoutWW/QueryPerf-VS-Extension-CodeLens","owner":"ReinoutWW","description":"Show query performance directly at the method itself, leveraging CodeLens to get direct insights","archived":false,"fork":false,"pushed_at":"2025-02-27T20:09:06.000Z","size":1033,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T20:17:46.887Z","etag":null,"topics":["demo","performance-analysis","query-performance","visual-studio","visual-studio-extension"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReinoutWW.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-26T22:10:57.000Z","updated_at":"2025-02-27T20:09:10.000Z","dependencies_parsed_at":"2025-02-27T20:22:31.775Z","dependency_job_id":"e7c101f8-acac-4cd8-9bec-3b11e101eb9c","html_url":"https://github.com/ReinoutWW/QueryPerf-VS-Extension-CodeLens","commit_stats":null,"previous_names":["reinoutww/queryperf-vs-extension-codelens"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReinoutWW%2FQueryPerf-VS-Extension-CodeLens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReinoutWW%2FQueryPerf-VS-Extension-CodeLens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReinoutWW%2FQueryPerf-VS-Extension-CodeLens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReinoutWW%2FQueryPerf-VS-Extension-CodeLens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReinoutWW","download_url":"https://codeload.github.com/ReinoutWW/QueryPerf-VS-Extension-CodeLens/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241329396,"owners_count":19944982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["demo","performance-analysis","query-performance","visual-studio","visual-studio-extension"],"created_at":"2025-03-01T06:37:34.211Z","updated_at":"2025-03-01T06:37:34.746Z","avatar_url":"https://github.com/ReinoutWW.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeLens Query Performance - V2\n\nA **Visual Studio 2022 Extension** that displays query performance statistics in the editor, leveraging **CodeLens**. The extension reads saved data (e.g., from a CSV file) to show **execution time**, **bytes sent/received**, **row counts**, **column counts**, and more—directly above each method in your source code.\n\n\u003cimg src=\"https://github.com/ReinoutWW/QueryPerf-VS-Extension-CodeLens/blob/master/CodeLensQueryPerformance/QueryPerformance.png\" alt=\"Example Image\" width=\"300\"\u003e\n\n## Overview\n\n- **Purpose**: Give developers immediate insight into performance metrics at the method level, without leaving the IDE.\n- **Data Source**: A CSV file (for demo purposes) located at `C:\\CodeLens\\CodeLensSourceData3.csv`.\n- **Identification**: Each row in the dataset corresponds to a specific “tag” (namespace + class + method signature).\n- **Future**: An automatic connection to Azure Application Insights is planned for live, dynamic data.\n\n## Preview\n\n\u003cimg src=\"https://github.com/ReinoutWW/QueryPerf-VS-Extension-CodeLens/blob/master/PerfPreview.png\" alt=\"Example Image\" width=\"550\"\u003e\n*CodeLens Query Performance Extension Preview*\n\n## How It Works\n\n1. **Tag Detection**  \n   The extension identifies methods by a “tag” (usually a combination of **namespace**, **class**, and **method**).  \n   \n2. **Data Lookup**  \n   When you open or hover over a method in Visual Studio, CodeLens queries the CSV file for matching performance data (using the tag).\n\n3. **Display Metrics**  \n   If found, the extension shows performance metrics (min/max/avg/total) for items like:\n   - Bytes Sent\n   - Bytes Received\n   - Total Bytes\n   - Row Count\n   - Column Count\n   - Execution Time\n   - (and more, as your dataset supports)\n\n## Dataset Format\n\nFor this **demo** version, you must place your CSV dataset at: `C:\\CodeLens\\CodeLensSourceData3.csv`\n\n\nEach row in the CSV should match the following schema:\n\n| Column               | Description                                      |\n|----------------------|--------------------------------------------------|\n| Tag                  | Identifier (namespace.class.method)              |\n| QueryCount           | Number of times the query was invoked            |\n| UniqueUserCount      | Number of unique users who triggered the query   |\n| BytesSent_Min        | Minimum bytes sent                               |\n| BytesSent_Max        | Maximum bytes sent                               |\n| BytesSent_Avg        | Average bytes sent                               |\n| BytesSent_Total      | Total bytes sent                                 |\n| BytesReceived_Min    | Minimum bytes received                           |\n| BytesReceived_Max    | Maximum bytes received                           |\n| BytesReceived_Avg    | Average bytes received                           |\n| BytesReceived_Total  | Total bytes received                             |\n| TotalBytes_Min       | Minimum total bytes (sent + received)           |\n| TotalBytes_Max       | Maximum total bytes (sent + received)           |\n| TotalBytes_Avg       | Average total bytes (sent + received)           |\n| TotalBytes_Total     | Summation of total bytes (sent + received)       |\n| Rows_Min             | Minimum rows returned (SelectRows + IduRows)     |\n| Rows_Max             | Maximum rows returned                            |\n| Rows_Avg             | Average rows returned                            |\n| Rows_Total           | Total rows returned                              |\n| Columns_Min          | Minimum column count                             |\n| Columns_Max          | Maximum column count                             |\n| Columns_Avg          | Average column count                             |\n| Columns_Total        | Total columns across queries                     |\n| ExecutionTime_Min    | Minimum execution time (milliseconds)            |\n| ExecutionTime_Max    | Maximum execution time                           |\n| ExecutionTime_Avg    | Average execution time                           |\n| ExecutionTime_Total  | Summation of execution time across all queries   |\n\n*(You can add or remove columns as needed, as long as the extension’s code is updated to parse them.)*\n\n## Setup \u0026 Installation\n\n1. **Build the Extension**  \n   Open the solution in Visual Studio 2022 and build the *CodeLens Query Performance - V2* project.\n\n2. **Install/Deploy**  \n   - After building, you can install the resulting `.vsix` file or launch the experimental VS instance for testing.\n\n3. **Prepare the CSV**  \n   - Place your CSV at the path `C:\\CodeLens\\CodeLensSourceData3.csv`.\n   - Ensure each row has a **tag** that matches your actual method signature (e.g., `MyProject.DataAccess.UserRepository.GetUserById`).\n\n4. **Launch Visual Studio**  \n   - Open any solution containing methods that match the tags in your CSV.\n   - Verify CodeLens appears above those methods, showing the relevant performance data.\n\n## Future Enhancements\n\n- **Azure Application Insights Integration**  \n  Instead of relying on a local CSV, the extension could pull real-time telemetry from Azure App Insights.\n- **Query Interceptors**  \n  Automate data collection by intercepting queries at runtime and storing metrics in a central repository.\n- **Customizable Layout**  \n  Let users choose which metrics to display or hide in CodeLens.\n\n## Contributing\n\n1. **Fork** this repo.\n2. **Create** a feature branch.\n3. **Commit** your changes.\n4. **Open** a Pull Request with a clear description of your contribution.\n\n## License\n\nThis project is released as a **demo**. Check the accompanying license file (if any) for details.\n\n---\n\n**Happy coding!** For any inquiries or bug reports, please open an issue or contact the project maintainer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freinoutww%2Fqueryperf-vs-extension-codelens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freinoutww%2Fqueryperf-vs-extension-codelens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freinoutww%2Fqueryperf-vs-extension-codelens/lists"}