Skip to content

Commit 8cd8304

Browse files
Add Python and JavaScript emitters to benchmark testing (#4525)
The benchmark engine was missing the Python and JavaScript emitters, so their SDK generation performance was not being tracked. ## Changes - **`packages/benchmark/package.json`** — added `@azure-tools/typespec-python` and `@typespec/http-client-js` as workspace dependencies - **`specs/azure-arm-resource-manager/tspconfig.yaml`** — added Python and JavaScript emitters - **`specs/azure-core-dataplane/tspconfig.yaml`** — added Python emitter with `package-mode: dataplane` and JavaScript emitter - **`specs/azure-full/tspconfig.yaml`** — added Python emitter with `package-mode: dataplane` and JavaScript emitter Example config for the ARM spec: ```yaml emit: - "@azure-tools/typespec-autorest" - "@azure-tools/typespec-python" - "@typespec/http-client-js" options: "@azure-tools/typespec-python": namespace: "azure.mgmt.contosobenchmark" ``` Emit timing for both emitters will now appear in benchmark comparisons under `emit/@azure-tools/typespec-python` and `emit/@typespec/http-client-js`. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
1 parent d0d2d7c commit 8cd8304

6 files changed

Lines changed: 29 additions & 3 deletions

File tree

cspell.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ words:
3939
- byos
4040
- chartjs
4141
- clsx
42+
- contosobenchmark
4243
- contosowidgetmanager
4344
- Chenjie
4445
- DMSS

packages/benchmark/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
"@azure-tools/typespec-azure-resource-manager": "workspace:^",
3232
"@azure-tools/typespec-azure-rulesets": "workspace:^",
3333
"@azure-tools/typespec-autorest": "workspace:^",
34-
"@azure-tools/typespec-client-generator-core": "workspace:^"
34+
"@azure-tools/typespec-client-generator-core": "workspace:^",
35+
"@azure-tools/typespec-python": "workspace:^",
36+
"@typespec/http-client-js": "workspace:^"
3537
},
3638
"devDependencies": {
3739
"@types/node": "catalog:",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
emit:
22
- "@azure-tools/typespec-autorest"
3+
- "@azure-tools/typespec-python"
4+
- "@typespec/http-client-js"
35
options:
46
"@azure-tools/typespec-autorest":
57
use-read-only-status-schema: true
68
output-file: "{emitter-output-dir}/{service-name}/{version}/openapi.json"
9+
"@azure-tools/typespec-python":
10+
namespace: "azure.mgmt.contosobenchmark"
711
linter:
812
extends:
913
- "@azure-tools/typespec-azure-rulesets/resource-manager"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
emit:
22
- "@azure-tools/typespec-autorest"
33
- "@typespec/openapi3"
4+
- "@azure-tools/typespec-python"
5+
- "@typespec/http-client-js"
46
options:
57
"@azure-tools/typespec-autorest":
68
output-file: "{emitter-output-dir}/{service-name}/{version}/openapi.json"
9+
"@azure-tools/typespec-python":
10+
namespace: "contoso.benchmarkwidgets"
11+
package-mode: dataplane
712
linter:
813
extends:
914
- "@azure-tools/typespec-azure-rulesets/data-plane"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
emit:
22
- "@azure-tools/typespec-autorest"
33
- "@typespec/openapi3"
4+
- "@azure-tools/typespec-python"
5+
- "@typespec/http-client-js"
46
options:
57
"@azure-tools/typespec-autorest":
68
use-read-only-status-schema: true
79
output-file: "{emitter-output-dir}/{service-name}/{version}/openapi.json"
10+
"@azure-tools/typespec-python":
11+
namespace: "contoso.benchmarkfull"
12+
package-mode: dataplane
813
linter:
914
extends:
1015
- "@azure-tools/typespec-azure-rulesets/data-plane"

pnpm-lock.yaml

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)