Git Product home page Git Product logo

Comments (4)

syodage avatar syodage commented on May 27, 2024

@nevillelyh came up an implementation for #1 https://github.com/spotify/magnolify/tree/shameera/case_mapping

Couldn't see a better way to bake this into trait Converter. if we go this path, we have to update the all necessary *Type.

case class Track(trackId: Int, trackName: String)
val aft = AvroType[Track](toSnakeCase)

Screen Shot 2020-06-08 at 12 26 04 PM

from magnolify.

nevillelyh avatar nevillelyh commented on May 27, 2024

New WIP branch: https://github.com/spotify/magnolify/tree/case-mapper

from magnolify.

nevillelyh avatar nevillelyh commented on May 27, 2024

Did some basic benchmark. Mostly Ok but AvroBench.avroTo seems way off.

master:

[info] AvroBench.avroFrom            avgt   10   1968.186 ±  99.247  ns/op
[info] AvroBench.avroSchmea          avgt   10   6843.803 ± 115.318  ns/op
[info] AvroBench.avroTo              avgt   10  72808.144 ± 881.913  ns/op
[info] TableRowBench.tableRowFrom    avgt   10   9746.518 ± 174.121  ns/op
[info] TableRowBench.tableRowSchema  avgt   10  23132.630 ± 276.478  ns/op
[info] TableRowBench.tableRowTo      avgt   10  11080.110 ± 153.466  ns/op

identity mapper:

[info] AvroBench.avroFrom            avgt   10    1942.699 ±    47.263  ns/op
[info] AvroBench.avroSchmea          avgt   10    6834.892 ±   155.658  ns/op
[info] AvroBench.avroTo              avgt   10  273955.338 ± 25053.639  ns/op
[info] TableRowBench.tableRowFrom    avgt   10    9822.360 ±   129.232  ns/op
[info] TableRowBench.tableRowSchema  avgt   10   22818.333 ±   192.875  ns/op
[info] TableRowBench.tableRowTo      avgt   10   11765.242 ±    83.626  ns/op

from magnolify.

nevillelyh avatar nevillelyh commented on May 27, 2024

After adding schema cache:

[info] Benchmark                     Mode  Cnt      Score     Error  Units
[info] AvroBench.avroFrom            avgt    5   1736.875 ±  30.571  ns/op
[info] AvroBench.avroSchmea          avgt    5   6780.416 ± 223.390  ns/op
[info] AvroBench.avroTo              avgt    5   5370.960 ± 323.343  ns/op
[info] TableRowBench.tableRowFrom    avgt    5  10015.674 ± 407.268  ns/op
[info] TableRowBench.tableRowSchema  avgt    5  22828.502 ± 564.830  ns/op
[info] TableRowBench.tableRowTo      avgt    5  11300.360 ± 308.394  ns/op

from magnolify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.