Skip to content

Conversation

@alexzielenski
Copy link
Member

This PR mirrors #279 but for the OpenAPI v3 types.
Motivatoin/detials are in that issue

Benchmark Results
From: https://github.com/alexzielenski/kube-openapi-gnostic-benchmark

Using JSON:

BenchmarkSlowConversionV3
BenchmarkSlowConversionV3/json->kube
BenchmarkSlowConversionV3/json->kube-8         	       2	 585903594 ns/op	149246568 B/op	 1835197 allocs/op
BenchmarkSlowConversionV3/json->gnostic
BenchmarkSlowConversionV3/json->gnostic-8      	       4	 290851778 ns/op	116498218 B/op	 1528737 allocs/op
BenchmarkSlowConversionV3/gnostic->pb
BenchmarkSlowConversionV3/gnostic->pb-8        	      72	  15533586 ns/op	 4304896 B/op	      47 allocs/op
BenchmarkSlowConversionV3/pb->gnostic
BenchmarkSlowConversionV3/pb->gnostic-8        	      58	  19689780 ns/op	14967265 B/op	  170123 allocs/op
BenchmarkSlowConversionV3/gnostic->json
BenchmarkSlowConversionV3/gnostic->json-8      	      50	  24571630 ns/op	 5867870 B/op	      47 allocs/op
BenchmarkSlowConversionV3/json->kube#01
BenchmarkSlowConversionV3/json->kube#01-8      	       2	 625525483 ns/op	149450440 B/op	 1835730 allocs/op

In total a conversion from

PB -> Gnostic -> JSON -> Kube-OpenAPIv3 was approx 670ms

Using YAML:

BenchmarkFastConversionV3
BenchmarkFastConversionV3/json->kube
BenchmarkFastConversionV3/json->kube-8         	       2	 573242620 ns/op	149247712 B/op	 1835203 allocs/op
BenchmarkFastConversionV3/json->gnostic
BenchmarkFastConversionV3/json->gnostic-8      	       4	 294514478 ns/op	116470526 B/op	 1528736 allocs/op
BenchmarkFastConversionV3/gnostic->pb
BenchmarkFastConversionV3/gnostic->pb-8        	      69	  16159228 ns/op	 4304929 B/op	      47 allocs/op
BenchmarkFastConversionV3/pb->gnostic
BenchmarkFastConversionV3/pb->gnostic-8        	      64	  19036357 ns/op	14967267 B/op	  170123 allocs/op
BenchmarkFastConversionV3/gnostic->yaml
BenchmarkFastConversionV3/gnostic->yaml-8      	      31	  44807695 ns/op	37846702 B/op	  388852 allocs/op
BenchmarkFastConversionV3/yaml->kube
BenchmarkFastConversionV3/yaml->kube-8         	      14	  87296806 ns/op	37919867 B/op	  733867 allocs/op

In total a conversion from

PB -> Gnostic -> YAML -> Kube-OpenAPIv3 was approx 151ms

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 25, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: alexzielenski
To complete the pull request process, please assign sttts after the PR has been reviewed.
You can assign the PR to them by writing /assign @sttts in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@alexzielenski alexzielenski changed the title yaml unmarshal for OpenAPIv2 types yaml unmarshal for OpenAPIv3 types Feb 25, 2022
@alexzielenski
Copy link
Member Author

/assign @Jefftree

@alexzielenski alexzielenski changed the title yaml unmarshal for OpenAPIv3 types [wip] yaml unmarshal for OpenAPIv3 types Mar 9, 2022
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 9, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 7, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 7, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants