Skip to content

Allow cardinality #91

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Allow cardinality #91

wants to merge 2 commits into from

Conversation

vearutop
Copy link
Owner

No description provided.

Copy link

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 19 4488 (+151) 3415 (+124) 113 960 (+27) 952 (+45) 91.3K (+3K)
Go (test) 7 1036 (+1) 807 (+1) 43 186 17 26.5K (+25B)

Copy link

Go API Changes

# github.com/vearutop/flatjsonl/flatjsonl
## incompatible changes
(*FastWalker).GetKey: changed from func(int64, []byte, []string, *github.com/valyala/fastjson.Value) to func(int64, []byte, []string, *github.com/vearutop/fastjson.Value)
(*FastWalker).WalkFastJSON: changed from func(int64, []byte, int, []string, *github.com/valyala/fastjson.Value) to func(int64, []byte, int, []string, *github.com/vearutop/fastjson.Value)
## compatible changes
Config.AllowCardinality: added
Flags.ShowJSONSchema: added
JSONSchema: added
KeyHierarchy.Schema: added

# summary
Inferred base version: v0.9.1
Suggested version: v0.10.0

Copy link

Benchmark Result

Benchmark diff with base branch
name                                     old time/op    new time/op    delta
NewProcessor/test_scanKeys-4               25.6ns ± 2%    26.0ns ± 3%      ~     (p=0.175 n=5+5)
NewProcessor/test_writeOutput-4            445ns ±116%    443ns ±114%      ~     (p=0.841 n=5+5)
NewProcessor/test_get_key_scanKeys-4       0.00ns ±17%    0.00ns ±53%      ~     (p=0.135 n=5+5)
NewProcessor/test_get_key_writeOutput-4    1.05ns ± 5%    1.04ns ± 5%      ~     (p=0.841 n=5+5)
NewProcessor/transpose_writeOutput-4        669ns ±94%     114ns ±83%   -82.94%  (p=0.032 n=5+5)
NewProcessor/coalesce_scanKeys-4           44.7ns ± 1%    59.9ns ± 4%   +34.07%  (p=0.008 n=5+5)
NewProcessor/coalesce_writeOutput-4         747ns ±96%     796ns ±92%      ~     (p=0.690 n=5+5)

name                                     old alloc/op   new alloc/op   delta
NewProcessor/test_scanKeys-4                5.00B ± 0%     5.00B ± 0%      ~     (all equal)
NewProcessor/test_writeOutput-4             12.8B ±22%     12.8B ±22%      ~     (p=1.000 n=5+5)
NewProcessor/test_get_key_scanKeys-4        0.00B          0.00B           ~     (all equal)
NewProcessor/test_get_key_writeOutput-4     0.00B          0.00B           ~     (all equal)
NewProcessor/transpose_writeOutput-4        93.2B ±57%      3.8B ±32%   -95.92%  (p=0.008 n=5+5)
NewProcessor/coalesce_scanKeys-4            8.00B ± 0%     8.00B ± 0%      ~     (all equal)
NewProcessor/coalesce_writeOutput-4         29.8B ±23%     29.8B ±23%      ~     (p=1.000 n=5+5)

name                                     old allocs/op  new allocs/op  delta
NewProcessor/test_scanKeys-4                 0.00           0.00           ~     (all equal)
NewProcessor/test_writeOutput-4              0.00           0.00           ~     (all equal)
NewProcessor/test_get_key_scanKeys-4         0.00           0.00           ~     (all equal)
NewProcessor/test_get_key_writeOutput-4      0.00           0.00           ~     (all equal)
NewProcessor/transpose_writeOutput-4        1.80 ±100%      0.00       -100.00%  (p=0.048 n=5+5)
NewProcessor/coalesce_scanKeys-4             0.00           0.00           ~     (all equal)
NewProcessor/coalesce_writeOutput-4          0.00           0.00           ~     (all equal)
Benchmark result
name                                     time/op
NewProcessor/test_scanKeys-4             26.0ns ± 3%
NewProcessor/test_writeOutput-4          443ns ±114%
NewProcessor/test_get_key_scanKeys-4     0.00ns ±53%
NewProcessor/test_get_key_writeOutput-4  1.04ns ± 5%
NewProcessor/transpose_writeOutput-4      114ns ±83%
NewProcessor/coalesce_scanKeys-4         59.9ns ± 4%
NewProcessor/coalesce_writeOutput-4       796ns ±92%

name                                     alloc/op
NewProcessor/test_scanKeys-4              5.00B ± 0%
NewProcessor/test_writeOutput-4           12.8B ±22%
NewProcessor/test_get_key_scanKeys-4      0.00B     
NewProcessor/test_get_key_writeOutput-4   0.00B     
NewProcessor/transpose_writeOutput-4      3.80B ±32%
NewProcessor/coalesce_scanKeys-4          8.00B ± 0%
NewProcessor/coalesce_writeOutput-4       29.8B ±23%

name                                     allocs/op
NewProcessor/test_scanKeys-4               0.00     
NewProcessor/test_writeOutput-4            0.00     
NewProcessor/test_get_key_scanKeys-4       0.00     
NewProcessor/test_get_key_writeOutput-4    0.00     
NewProcessor/transpose_writeOutput-4       0.00     
NewProcessor/coalesce_scanKeys-4           0.00     
NewProcessor/coalesce_writeOutput-4        0.00     

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.

1 participant