Restore emitter timing instrumentation (console.time) in $onEmit for testing#3955
Draft
Copilot wants to merge 3 commits into
Draft
Restore emitter timing instrumentation (console.time) in $onEmit for testing#3955Copilot wants to merge 3 commits into
console.time) in $onEmit for testing#3955Copilot wants to merge 3 commits into
Conversation
Agent-Logs-Url: https://github.com/Azure/autorest.typescript/sessions/5e6dc87a-835d-43d9-9d71-51bf700e5f2b Co-authored-by: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/autorest.typescript/sessions/5e6dc87a-835d-43d9-9d71-51bf700e5f2b Co-authored-by: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add console.time back for testing purposes
Restore emitter timing instrumentation (May 12, 2026
console.time) in $onEmit for testing
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR restores the
console.time/console.timeEndinstrumentation that was removed in #3483. The goal is to bring back timing visibility in the TypeSpec emitter pipeline for testing and performance observation.What changed
packages/typespec-ts/src/index.tsinside$onEmit.Lint-scope handling
no-consoleenforcement intact by applying// eslint-disable-next-line no-consoleonly on restored timing lines, instead of broad file/function-level suppression.Illustrative snippet
Original prompt
#3483
[Chronological Review: The conversation began with the user requesting modifications to the function `knownMediaType` to handle a specific case for the "/" character. The user then inquired about potential modifications in another file, `transformParameters.ts`, and asked various questions regarding the code logic, particularly around the handling of different content types and encoding. The user also requested to add back `console.time` in a specific pull request for testing purposes.]这个pr吧console.time 给删除了,现在需要一个用来做testing的pr,需要把console.time 加回原来的位置
[Intent Mapping:
knownMediaTypefunction.tcgc.tcgcdoes not encode.console.timein a specific pull request for testing.][Technical Inventory:
knownMediaType: Needs modification to handle "/" character.transformParameters.ts: Potential modifications discussed.application/xml.tcgc.][Code Archaeology:
knownMediaType: Function to be modified.transformParameters.ts: File under consideration for changes.uint8ArrayToString, and conditions for scalar types.][Progress Assessment:
knownMediaType, potential changes intransformParameters.ts, and adding backconsole.timein the PR.][Context Validation: All user requests and inquiries are captured, providing a clear path for continuation.]
[Recent Commands Analysis:
knownMediaTypefunction and check another file for necessary changes.1. Conversation Overview: - Primary Objectives: User requested modifications to the `knownMediaType` function to handle the "/" character and inquired about related logic in other files. User also asked various questions about encoding, content types, and specific lines of code. - Session Context: The conversation has revolved around understanding and modifying code logic, particularly in the context of media types and encoding. - User Intent Evolution: The user has shifted from specific function modifications to broader inquiries about code behavior and testing requirements.- Technical Foundation:
- Function
- File
- Content Types: User wants to add handling for
- Encoding Logic: User is exploring when encoding occurs and the behavior of
- Codebase Status:
- File Name:
- Purpose: Core functionality related to media type handling.
- Current State: User is requesting modifications and clarifications on specific lines.
- Key Code Segments: Line 111 regarding `uint8ArrayToString...
knownMediaType: Needs to be modified to returnKnownMediaType.Binaryfor the "/" character.transformParameters.ts: Potential modifications discussed.application/xml.tcgc.index.tsCreated from VS Code.