Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using a custom KV store to keep consistent JSON ordering #52

Merged
merged 2 commits into from
May 31, 2024

Conversation

alecsammon
Copy link
Contributor

See #50 for full discussion

Fixes: #49

Allows for overwriting the default map[string]interface{} to allow for consistent ordering in the generated JSON.

@coveralls
Copy link

coveralls commented May 31, 2024

Coverage Status

coverage: 89.167% (+0.5%) from 88.646%
when pulling 3ffae7a on alecsammon:custom_kvstore
into 60a4260 on liip:master.

@coveralls
Copy link

Coverage Status

coverage: 89.167% (+0.5%) from 88.646%
when pulling 71dfc70 on alecsammon:custom_kvstore
into 60a4260 on liip:master.

1 similar comment
@coveralls
Copy link

Coverage Status

coverage: 89.167% (+0.5%) from 88.646%
when pulling 71dfc70 on alecsammon:custom_kvstore
into 60a4260 on liip:master.

@alecsammon
Copy link
Contributor Author

Performance:
Before change:

  1. BenchmarkModelsMarshaller_Marshal-8 78291 15360 ns/op
  2. BenchmarkModelsMarshaller_Marshal-8 78034 15334 ns/op
  3. BenchmarkModelsMarshaller_Marshal-8 77398 15560 ns/op
  4. BenchmarkModelsMarshaller_Marshal-8 78068 15211 ns/op
  5. BenchmarkModelsMarshaller_Marshal-8 78171 15280 ns/op

With change

  1. BenchmarkModelsMarshaller_Marshal-8 77037 15457 ns/op
  2. BenchmarkModelsMarshaller_Marshal-8 77643 15623 ns/op
  3. BenchmarkModelsMarshaller_Marshal-8 74809 15513 ns/op
  4. BenchmarkModelsMarshaller_Marshal-8 76140 15480 ns/op
  5. BenchmarkModelsMarshaller_Marshal-8 77620 15347 ns/op

Average before: 15349 ns/op
Average after: 15484 ns/op

@mweibel
Copy link
Collaborator

mweibel commented May 31, 2024

👍 looks good to me

README.md Show resolved Hide resolved
sheriff_test.go Show resolved Hide resolved
@alecsammon alecsammon marked this pull request as ready for review May 31, 2024 09:00
@mweibel mweibel merged commit e127e90 into liip:master May 31, 2024
4 checks passed
@mweibel
Copy link
Collaborator

mweibel commented May 31, 2024

thanks for the contributions @alecsammon - I released those as v2.0.0-beta.2. Unless I get issues reported in the next few weeks I'll make a stable release afterwards.

@alecsammon
Copy link
Contributor Author

@mweibel - thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sheriff reorders the fields alphabetically
3 participants