Commit graph

545 commits

Author SHA1 Message Date
Jawher Moussa
73e8e76de2 Fix universal translator imports so that goimports doesn't get remove them
Running goimports on the codebase deletes all the imports of "github.com/go-playground/universal-translator".

The fix consists of explicitly qualifying the import statements with ut.
2016-09-22 13:29:12 +02:00
Dean Karn
23e84d2f88 Update README.md 2016-09-19 11:36:13 -04:00
Dean Karn
678f8cf9a3 Merge branch 'field-level-validation2' into v9 2016-09-19 11:35:22 -04:00
Dean Karn
cddc415625 perf enhancements + corrected issue with or's
- or's weren't reporting the param back in the tag, long standing but noticed issue.
- added validation check for or's when more validations exist after the or.
2016-09-19 11:28:38 -04:00
Dean Karn
42a0d6df3b some minor perf with recursion 2016-09-17 14:12:20 -04:00
Dean Karn
7c2b5d8471 Update README.md 2016-09-16 13:24:00 -04:00
Dean Karn
4b3eedc379 Merge branch 'i18n-custom-errors' into v9 2016-09-15 15:58:17 -04:00
Dean Karn
110c8638eb add good documentation 2016-09-15 15:31:31 -04:00
Dean Karn
0e70fdfc72 add translation example + documentation 2016-09-15 15:31:07 -04:00
Dean Karn
a7ca4a1d32 add default translations for "en"
- need help creating more.
2016-09-15 14:50:04 -04:00
Dean Karn
532878b008 initial translation/custom error code 2016-09-14 14:48:46 -04:00
Dean Karn
6f98212623 Update CONTRIBUTING.md 2016-09-01 09:13:50 -04:00
Dean Karn
0af0043f29 update CI badge to v9 2016-09-01 08:38:55 -04:00
Dean Karn
a7cc53a707 documentation, examples and template updates. 2016-09-01 08:36:55 -04:00
Dean Karn
9ba3297c49 Update benchmarks run against Go 1.7
Go 1.7 some nice boosts, for nothing!

```

benchmark                                                       old ns/op     new ns/op     delta
BenchmarkFieldSuccess-8                                         147           108           -26.53%
BenchmarkFieldSuccessParallel-8                                 42.5          35.7          -16.00%
BenchmarkFieldFailure-8                                         417           320           -23.26%
BenchmarkFieldFailureParallel-8                                 140           113           -19.29%
BenchmarkFieldDiveSuccess-8                                     876           726           -17.12%
BenchmarkFieldDiveSuccessParallel-8                             277           263           -5.05%
BenchmarkFieldDiveFailure-8                                     1185          939           -20.76%
BenchmarkFieldDiveFailureParallel-8                             402           382           -4.98%
BenchmarkFieldCustomTypeSuccess-8                               321           268           -16.51%
BenchmarkFieldCustomTypeSuccessParallel-8                       104           87.8          -15.58%
BenchmarkFieldCustomTypeFailure-8                               416           310           -25.48%
BenchmarkFieldCustomTypeFailureParallel-8                       150           131           -12.67%
BenchmarkFieldOrTagSuccess-8                                    1119          889           -20.55%
BenchmarkFieldOrTagSuccessParallel-8                            462           418           -9.52%
BenchmarkFieldOrTagFailure-8                                    715           546           -23.64%
BenchmarkFieldOrTagFailureParallel-8                            436           450           +3.21%
BenchmarkStructLevelValidationSuccess-8                         399           336           -15.79%
BenchmarkStructLevelValidationSuccessParallel-8                 140           123           -12.14%
BenchmarkStructLevelValidationFailure-8                         749           611           -18.42%
BenchmarkStructLevelValidationFailureParallel-8                 296           298           +0.68%
BenchmarkStructSimpleCustomTypeSuccess-8                        673           555           -17.53%
BenchmarkStructSimpleCustomTypeSuccessParallel-8                213           197           -7.51%
BenchmarkStructSimpleCustomTypeFailure-8                        1056          811           -23.20%
BenchmarkStructSimpleCustomTypeFailureParallel-8                450           370           -17.78%
BenchmarkStructPartialSuccess-8                                 789           676           -14.32%
BenchmarkStructPartialSuccessParallel-8                         307           301           -1.95%
BenchmarkStructPartialFailure-8                                 1105          1001          -9.41%
BenchmarkStructPartialFailureParallel-8                         493           436           -11.56%
BenchmarkStructExceptSuccess-8                                  1212          1038          -14.36%
BenchmarkStructExceptSuccessParallel-8                          282           281           -0.35%
BenchmarkStructExceptFailure-8                                  1004          863           -14.04%
BenchmarkStructExceptFailureParallel-8                          452           379           -16.15%
BenchmarkStructSimpleCrossFieldSuccess-8                        656           549           -16.31%
BenchmarkStructSimpleCrossFieldSuccessParallel-8                211           192           -9.00%
BenchmarkStructSimpleCrossFieldFailure-8                        968           783           -19.11%
BenchmarkStructSimpleCrossFieldFailureParallel-8                406           296           -27.09%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8             1000          837           -16.30%
BenchmarkStructSimpleCrossStructCrossFieldSuccessParallel-8     334           284           -14.97%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8             1324          1110          -16.16%
BenchmarkStructSimpleCrossStructCrossFieldFailureParallel-8     520           416           -20.00%
BenchmarkStructSimpleSuccess-8                                  534           380           -28.84%
BenchmarkStructSimpleSuccessParallel-8                          144           114           -20.83%
BenchmarkStructSimpleFailure-8                                  1039          760           -26.85%
BenchmarkStructSimpleFailureParallel-8                          419           353           -15.75%
BenchmarkStructComplexSuccess-8                                 2678          2100          -21.58%
BenchmarkStructComplexSuccessParallel-8                         874           662           -24.26%
BenchmarkStructComplexFailure-8                                 6342          5080          -19.90%
BenchmarkStructComplexFailureParallel-8                         2875          2159          -24.90%

benchmark                                                       old allocs     new allocs     delta
BenchmarkFieldSuccess-8                                         0              0              +0.00%
BenchmarkFieldSuccessParallel-8                                 0              0              +0.00%
BenchmarkFieldFailure-8                                         4              4              +0.00%
BenchmarkFieldFailureParallel-8                                 4              4              +0.00%
BenchmarkFieldDiveSuccess-8                                     11             11             +0.00%
BenchmarkFieldDiveSuccessParallel-8                             11             11             +0.00%
BenchmarkFieldDiveFailure-8                                     16             16             +0.00%
BenchmarkFieldDiveFailureParallel-8                             16             16             +0.00%
BenchmarkFieldCustomTypeSuccess-8                               2              2              +0.00%
BenchmarkFieldCustomTypeSuccessParallel-8                       2              2              +0.00%
BenchmarkFieldCustomTypeFailure-8                               4              4              +0.00%
BenchmarkFieldCustomTypeFailureParallel-8                       4              4              +0.00%
BenchmarkFieldOrTagSuccess-8                                    1              1              +0.00%
BenchmarkFieldOrTagSuccessParallel-8                            1              1              +0.00%
BenchmarkFieldOrTagFailure-8                                    5              5              +0.00%
BenchmarkFieldOrTagFailureParallel-8                            5              5              +0.00%
BenchmarkStructLevelValidationSuccess-8                         2              2              +0.00%
BenchmarkStructLevelValidationSuccessParallel-8                 2              2              +0.00%
BenchmarkStructLevelValidationFailure-8                         8              8              +0.00%
BenchmarkStructLevelValidationFailureParallel-8                 8              8              +0.00%
BenchmarkStructSimpleCustomTypeSuccess-8                        2              2              +0.00%
BenchmarkStructSimpleCustomTypeSuccessParallel-8                2              2              +0.00%
BenchmarkStructSimpleCustomTypeFailure-8                        9              9              +0.00%
BenchmarkStructSimpleCustomTypeFailureParallel-8                10             10             +0.00%
BenchmarkStructPartialSuccess-8                                 6              6              +0.00%
BenchmarkStructPartialSuccessParallel-8                         6              6              +0.00%
BenchmarkStructPartialFailure-8                                 11             11             +0.00%
BenchmarkStructPartialFailureParallel-8                         11             11             +0.00%
BenchmarkStructExceptSuccess-8                                  12             12             +0.00%
BenchmarkStructExceptSuccessParallel-8                          5              5              +0.00%
BenchmarkStructExceptFailure-8                                  10             10             +0.00%
BenchmarkStructExceptFailureParallel-8                          10             10             +0.00%
BenchmarkStructSimpleCrossFieldSuccess-8                        3              3              +0.00%
BenchmarkStructSimpleCrossFieldSuccessParallel-8                3              3              +0.00%
BenchmarkStructSimpleCrossFieldFailure-8                        8              8              +0.00%
BenchmarkStructSimpleCrossFieldFailureParallel-8                8              8              +0.00%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8             4              4              +0.00%
BenchmarkStructSimpleCrossStructCrossFieldSuccessParallel-8     4              4              +0.00%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8             9              9              +0.00%
BenchmarkStructSimpleCrossStructCrossFieldFailureParallel-8     9              9              +0.00%
BenchmarkStructSimpleSuccess-8                                  0              0              +0.00%
BenchmarkStructSimpleSuccessParallel-8                          0              0              +0.00%
BenchmarkStructSimpleFailure-8                                  9              9              +0.00%
BenchmarkStructSimpleFailureParallel-8                          9              9              +0.00%
BenchmarkStructComplexSuccess-8                                 8              8              +0.00%
BenchmarkStructComplexSuccessParallel-8                         8              8              +0.00%
BenchmarkStructComplexFailure-8                                 53             53             +0.00%
BenchmarkStructComplexFailureParallel-8                         53             53             +0.00%

benchmark                                                       old bytes     new bytes     delta
BenchmarkFieldSuccess-8                                         0             0             +0.00%
BenchmarkFieldSuccessParallel-8                                 0             0             +0.00%
BenchmarkFieldFailure-8                                         192           192           +0.00%
BenchmarkFieldFailureParallel-8                                 192           192           +0.00%
BenchmarkFieldDiveSuccess-8                                     201           201           +0.00%
BenchmarkFieldDiveSuccessParallel-8                             201           201           +0.00%
BenchmarkFieldDiveFailure-8                                     396           396           +0.00%
BenchmarkFieldDiveFailureParallel-8                             397           397           +0.00%
BenchmarkFieldCustomTypeSuccess-8                               32            32            +0.00%
BenchmarkFieldCustomTypeSuccessParallel-8                       32            32            +0.00%
BenchmarkFieldCustomTypeFailure-8                               192           192           +0.00%
BenchmarkFieldCustomTypeFailureParallel-8                       192           192           +0.00%
BenchmarkFieldOrTagSuccess-8                                    16            16            +0.00%
BenchmarkFieldOrTagSuccessParallel-8                            16            16            +0.00%
BenchmarkFieldOrTagFailure-8                                    208           208           +0.00%
BenchmarkFieldOrTagFailureParallel-8                            208           208           +0.00%
BenchmarkStructLevelValidationSuccess-8                         32            32            +0.00%
BenchmarkStructLevelValidationSuccessParallel-8                 32            32            +0.00%
BenchmarkStructLevelValidationFailure-8                         288           288           +0.00%
BenchmarkStructLevelValidationFailureParallel-8                 288           288           +0.00%
BenchmarkStructSimpleCustomTypeSuccess-8                        32            32            +0.00%
BenchmarkStructSimpleCustomTypeSuccessParallel-8                32            32            +0.00%
BenchmarkStructSimpleCustomTypeFailure-8                        392           392           +0.00%
BenchmarkStructSimpleCustomTypeFailureParallel-8                408           408           +0.00%
BenchmarkStructPartialSuccess-8                                 256           256           +0.00%
BenchmarkStructPartialSuccessParallel-8                         256           256           +0.00%
BenchmarkStructPartialFailure-8                                 464           464           +0.00%
BenchmarkStructPartialFailureParallel-8                         464           464           +0.00%
BenchmarkStructExceptSuccess-8                                  480           480           +0.00%
BenchmarkStructExceptSuccessParallel-8                          240           240           +0.00%
BenchmarkStructExceptFailure-8                                  448           448           +0.00%
BenchmarkStructExceptFailureParallel-8                          448           448           +0.00%
BenchmarkStructSimpleCrossFieldSuccess-8                        72            72            +0.00%
BenchmarkStructSimpleCrossFieldSuccessParallel-8                72            72            +0.00%
BenchmarkStructSimpleCrossFieldFailure-8                        288           288           +0.00%
BenchmarkStructSimpleCrossFieldFailureParallel-8                288           288           +0.00%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8             80            80            +0.00%
BenchmarkStructSimpleCrossStructCrossFieldSuccessParallel-8     80            80            +0.00%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8             304           304           +0.00%
BenchmarkStructSimpleCrossStructCrossFieldFailureParallel-8     304           304           +0.00%
BenchmarkStructSimpleSuccess-8                                  0             0             +0.00%
BenchmarkStructSimpleSuccessParallel-8                          0             0             +0.00%
BenchmarkStructSimpleFailure-8                                  392           392           +0.00%
BenchmarkStructSimpleFailureParallel-8                          392           392           +0.00%
BenchmarkStructComplexSuccess-8                                 128           128           +0.00%
BenchmarkStructComplexSuccessParallel-8                         128           128           +0.00%
BenchmarkStructComplexFailure-8                                 2833          2833          +0.00%
BenchmarkStructComplexFailureParallel-8                         2833          2833          +0.00%

```
2016-08-23 16:10:39 -04:00
Dean Karn
1cbfa0bbff RC1 Release 2016-08-08 10:13:19 -04:00
joeybloggs
b0883e6ed8 RC1 Release
- Updated docs ( much more to come )
- v9 is much simpler to use.

v8 vs v9 improvements

```
benchmark                                               old ns/op     new ns/op     delta
BenchmarkFieldSuccess-8                                 118           147           +24.58%
BenchmarkFieldFailure-8                                 758           417           -44.99%
BenchmarkFieldDiveSuccess-8                             2471          876           -64.55%
BenchmarkFieldDiveFailure-8                             3172          1185          -62.64%
BenchmarkFieldCustomTypeSuccess-8                       300           321           +7.00%
BenchmarkFieldCustomTypeFailure-8                       775           416           -46.32%
BenchmarkFieldOrTagSuccess-8                            1122          1119          -0.27%
BenchmarkFieldOrTagFailure-8                            1167          715           -38.73%
BenchmarkStructLevelValidationSuccess-8                 548           399           -27.19%
BenchmarkStructLevelValidationFailure-8                 558           749           +34.23%
BenchmarkStructSimpleCustomTypeSuccess-8                623           673           +8.03%
BenchmarkStructSimpleCustomTypeFailure-8                1381          1056          -23.53%
BenchmarkStructPartialSuccess-8                         1036          789           -23.84%
BenchmarkStructPartialFailure-8                         1734          1105          -36.27%
BenchmarkStructExceptSuccess-8                          888           1212          +36.49%
BenchmarkStructExceptFailure-8                          1036          1004          -3.09%
BenchmarkStructSimpleCrossFieldSuccess-8                773           656           -15.14%
BenchmarkStructSimpleCrossFieldFailure-8                1487          968           -34.90%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8     1261          1000          -20.70%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8     2055          1324          -35.57%
BenchmarkStructSimpleSuccess-8                          519           534           +2.89%
BenchmarkStructSimpleFailure-8                          1429          1039          -27.29%
BenchmarkStructSimpleSuccessParallel-8                  146           144           -1.37%
BenchmarkStructSimpleFailureParallel-8                  551           419           -23.96%
BenchmarkStructComplexSuccess-8                         3269          2678          -18.08%
BenchmarkStructComplexFailure-8                         8436          6342          -24.82%
BenchmarkStructComplexSuccessParallel-8                 1024          874           -14.65%
BenchmarkStructComplexFailureParallel-8                 3536          2875          -18.69%

benchmark                                               old allocs     new allocs     delta
BenchmarkFieldSuccess-8                                 0              0              +0.00%
BenchmarkFieldFailure-8                                 4              4              +0.00%
BenchmarkFieldDiveSuccess-8                             28             11             -60.71%
BenchmarkFieldDiveFailure-8                             32             16             -50.00%
BenchmarkFieldCustomTypeSuccess-8                       2              2              +0.00%
BenchmarkFieldCustomTypeFailure-8                       4              4              +0.00%
BenchmarkFieldOrTagSuccess-8                            1              1              +0.00%
BenchmarkFieldOrTagFailure-8                            6              5              -16.67%
BenchmarkStructLevelValidationSuccess-8                 5              2              -60.00%
BenchmarkStructLevelValidationFailure-8                 5              8              +60.00%
BenchmarkStructSimpleCustomTypeSuccess-8                3              2              -33.33%
BenchmarkStructSimpleCustomTypeFailure-8                9              9              +0.00%
BenchmarkStructPartialSuccess-8                         9              6              -33.33%
BenchmarkStructPartialFailure-8                         14             11             -21.43%
BenchmarkStructExceptSuccess-8                          7              12             +71.43%
BenchmarkStructExceptFailure-8                          9              10             +11.11%
BenchmarkStructSimpleCrossFieldSuccess-8                4              3              -25.00%
BenchmarkStructSimpleCrossFieldFailure-8                9              8              -11.11%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8     7              4              -42.86%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8     12             9              -25.00%
BenchmarkStructSimpleSuccess-8                          1              0              -100.00%
BenchmarkStructSimpleFailure-8                          9              9              +0.00%
BenchmarkStructSimpleSuccessParallel-8                  1              0              -100.00%
BenchmarkStructSimpleFailureParallel-8                  9              9              +0.00%
BenchmarkStructComplexSuccess-8                         15             8              -46.67%
BenchmarkStructComplexFailure-8                         60             53             -11.67%
BenchmarkStructComplexSuccessParallel-8                 15             8              -46.67%
BenchmarkStructComplexFailureParallel-8                 60             53             -11.67%

benchmark                                               old bytes     new bytes     delta
BenchmarkFieldSuccess-8                                 0             0             +0.00%
BenchmarkFieldFailure-8                                 432           192           -55.56%
BenchmarkFieldDiveSuccess-8                             464           201           -56.68%
BenchmarkFieldDiveFailure-8                             896           396           -55.80%
BenchmarkFieldCustomTypeSuccess-8                       32            32            +0.00%
BenchmarkFieldCustomTypeFailure-8                       432           192           -55.56%
BenchmarkFieldOrTagSuccess-8                            4             16            +300.00%
BenchmarkFieldOrTagFailure-8                            448           208           -53.57%
BenchmarkStructLevelValidationSuccess-8                 160           32            -80.00%
BenchmarkStructLevelValidationFailure-8                 160           288           +80.00%
BenchmarkStructSimpleCustomTypeSuccess-8                36            32            -11.11%
BenchmarkStructSimpleCustomTypeFailure-8                640           392           -38.75%
BenchmarkStructPartialSuccess-8                         272           256           -5.88%
BenchmarkStructPartialFailure-8                         730           464           -36.44%
BenchmarkStructExceptSuccess-8                          250           480           +92.00%
BenchmarkStructExceptFailure-8                          272           448           +64.71%
BenchmarkStructSimpleCrossFieldSuccess-8                80            72            -10.00%
BenchmarkStructSimpleCrossFieldFailure-8                536           288           -46.27%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8     112           80            -28.57%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8     576           304           -47.22%
BenchmarkStructSimpleSuccess-8                          4             0             -100.00%
BenchmarkStructSimpleFailure-8                          640           392           -38.75%
BenchmarkStructSimpleSuccessParallel-8                  4             0             -100.00%
BenchmarkStructSimpleFailureParallel-8                  640           392           -38.75%
BenchmarkStructComplexSuccess-8                         244           128           -47.54%
BenchmarkStructComplexFailure-8                         3609          2833          -21.50%
BenchmarkStructComplexSuccessParallel-8                 244           128           -47.54%
BenchmarkStructComplexFailureParallel-8                 3609          2833          -21.50%
```
2016-08-08 09:54:52 -04:00
Dean Karn
852e5ff9f9 Merge pull request #252 from go-playground/v8
Update README.md
2016-08-06 22:00:05 -04:00
joeybloggs
2de56ed26a add parallel versions of all benchmarks 2016-08-06 21:47:16 -04:00
joeybloggs
3e196d49c6 saving some bytes uint8 vs int 2016-08-06 20:41:38 -04:00
joeybloggs
b2c8f66e7b why pass the Field names, they already belong to the namespaces... 2016-08-06 20:18:19 -04:00
joeybloggs
ea09db9292 aha! there's the extra allocation(s) Ive been chasing down! 2016-08-06 16:03:45 -04:00
joeybloggs
1714ba2b67 convert switch to if 2016-08-06 15:47:17 -04:00
joeybloggs
6765805f88 continuing perf optimizations 2016-08-06 15:23:45 -04:00
joeybloggs
27b607d6ad avoid a couple of dive allocations 2016-08-06 14:19:33 -04:00
joeybloggs
01925e342a regain 100% test coverage 2016-08-06 14:09:18 -04:00
joeybloggs
ecad6333b1 increase dive tag performance. 2016-08-06 13:55:36 -04:00
joeybloggs
dcdba454d7 some variable cleanup 2016-08-05 23:21:09 -04:00
joeybloggs
d9bfef9fe0 speed up structPartial and structExcept string parsing 2016-08-05 23:11:33 -04:00
joeybloggs
8d0fd80a80 removed creation of a couple stack variables and creation of errors 2016-08-05 23:02:12 -04:00
joeybloggs
a8f7aaba72 remove TODO: tried it, only helped with 1 allocation, not worth the overhead and potential contention 2016-08-05 22:34:40 -04:00
joeybloggs
f581a2d517 reuse field 2016-08-05 22:26:20 -04:00
joeybloggs
98dee40973 perf updates all around! 2016-08-05 22:15:08 -04:00
joeybloggs
560bff6526 testing 2016-08-05 16:10:01 -04:00
joeybloggs
8c60a612c5 code coverage back to 100% + some code cleanup 2016-08-05 12:34:43 -04:00
joeybloggs
2fe87f7a8d better error message. 2016-08-05 07:54:57 -04:00
joeybloggs
5fedd8c08a buffer errTag + errs array. 2016-08-05 07:15:25 -04:00
joeybloggs
5d28ac67f7 remove validatable logic as it does't really work, both with clarity and pointer vs non-pointer receivers 2016-08-04 21:20:58 -04:00
joeybloggs
1ff58be284 finish conversion of test + some fixes. 2016-08-04 11:00:01 -04:00
joeybloggs
3bf69e2bbd converting tests 2016-08-03 22:02:47 -04:00
joeybloggs
7e731afde9 field name updates 2016-08-03 19:20:42 -04:00
joeybloggs
e0e1af6a61 working instance 2016-08-03 14:46:35 -04:00
Dean Karn
598aac293f Update README.md 2016-08-02 09:45:00 -04:00
joeybloggs
5f57d2222a increment version in README 2016-07-18 09:41:25 -04:00
joeybloggs
77f59a0ea0 corrected some spelling mistakes in documentation 2016-07-18 09:40:22 -04:00
joeybloggs
1d3a3d281b Merge branch 'minor-perf-1' into v8 2016-07-18 09:13:00 -04:00
joeybloggs
89d5a94084 final touches + README updates
fresh test of old vs new benchmarks

```go

benchmark                                               old ns/op     new ns/op     delta
BenchmarkFieldSuccess-8                                 155           118           -23.87%
BenchmarkFieldFailure-8                                 777           758           -2.45%
BenchmarkFieldDiveSuccess-8                             2813          2471          -12.16%
BenchmarkFieldDiveFailure-8                             3544          3172          -10.50%
BenchmarkFieldCustomTypeSuccess-8                       328           300           -8.54%
BenchmarkFieldCustomTypeFailure-8                       748           775           +3.61%
BenchmarkFieldOrTagSuccess-8                            1169          1122          -4.02%
BenchmarkFieldOrTagFailure-8                            1205          1167          -3.15%
BenchmarkStructLevelValidationSuccess-8                 670           548           -18.21%
BenchmarkStructLevelValidationFailure-8                 1380          558           -59.57%
BenchmarkStructSimpleCustomTypeSuccess-8                889           623           -29.92%
BenchmarkStructSimpleCustomTypeFailure-8                1536          1381          -10.09%
BenchmarkStructPartialSuccess-8                         1194          1036          -13.23%
BenchmarkStructPartialFailure-8                         1869          1734          -7.22%
BenchmarkStructExceptSuccess-8                          949           888           -6.43%
BenchmarkStructExceptFailure-8                          1181          1036          -12.28%
BenchmarkStructSimpleCrossFieldSuccess-8                948           773           -18.46%
BenchmarkStructSimpleCrossFieldFailure-8                1708          1487          -12.94%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8     1608          1261          -21.58%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8     2320          2055          -11.42%
BenchmarkStructSimpleSuccess-8                          833           519           -37.70%
BenchmarkStructSimpleFailure-8                          1612          1429          -11.35%
BenchmarkStructSimpleSuccessParallel-8                  239           146           -38.91%
BenchmarkStructSimpleFailureParallel-8                  664           551           -17.02%
BenchmarkStructComplexSuccess-8                         5025          3269          -34.95%
BenchmarkStructComplexFailure-8                         10166         8436          -17.02%
BenchmarkStructComplexSuccessParallel-8                 1591          1024          -35.64%
BenchmarkStructComplexFailureParallel-8                 4306          3536          -17.88%

benchmark                                               old allocs     new allocs     delta
BenchmarkFieldSuccess-8                                 0              0              +0.00%
BenchmarkFieldFailure-8                                 4              4              +0.00%
BenchmarkFieldDiveSuccess-8                             27             28             +3.70%
BenchmarkFieldDiveFailure-8                             31             32             +3.23%
BenchmarkFieldCustomTypeSuccess-8                       2              2              +0.00%
BenchmarkFieldCustomTypeFailure-8                       4              4              +0.00%
BenchmarkFieldOrTagSuccess-8                            1              1              +0.00%
BenchmarkFieldOrTagFailure-8                            6              6              +0.00%
BenchmarkStructLevelValidationSuccess-8                 6              5              -16.67%
BenchmarkStructLevelValidationFailure-8                 11             5              -54.55%
BenchmarkStructSimpleCustomTypeSuccess-8                5              3              -40.00%
BenchmarkStructSimpleCustomTypeFailure-8                11             9              -18.18%
BenchmarkStructPartialSuccess-8                         10             9              -10.00%
BenchmarkStructPartialFailure-8                         15             14             -6.67%
BenchmarkStructExceptSuccess-8                          7              7              +0.00%
BenchmarkStructExceptFailure-8                          10             9              -10.00%
BenchmarkStructSimpleCrossFieldSuccess-8                6              4              -33.33%
BenchmarkStructSimpleCrossFieldFailure-8                11             9              -18.18%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8     10             7              -30.00%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8     15             12             -20.00%
BenchmarkStructSimpleSuccess-8                          3              1              -66.67%
BenchmarkStructSimpleFailure-8                          11             9              -18.18%
BenchmarkStructSimpleSuccessParallel-8                  3              1              -66.67%
BenchmarkStructSimpleFailureParallel-8                  11             9              -18.18%
BenchmarkStructComplexSuccess-8                         32             15             -53.12%
BenchmarkStructComplexFailure-8                         77             60             -22.08%
BenchmarkStructComplexSuccessParallel-8                 32             15             -53.12%
BenchmarkStructComplexFailureParallel-8                 77             60             -22.08%

benchmark                                               old bytes     new bytes     delta
BenchmarkFieldSuccess-8                                 0             0             +0.00%
BenchmarkFieldFailure-8                                 432           432           +0.00%
BenchmarkFieldDiveSuccess-8                             384           464           +20.83%
BenchmarkFieldDiveFailure-8                             816           896           +9.80%
BenchmarkFieldCustomTypeSuccess-8                       32            32            +0.00%
BenchmarkFieldCustomTypeFailure-8                       432           432           +0.00%
BenchmarkFieldOrTagSuccess-8                            4             4             +0.00%
BenchmarkFieldOrTagFailure-8                            448           448           +0.00%
BenchmarkStructLevelValidationSuccess-8                 168           160           -4.76%
BenchmarkStructLevelValidationFailure-8                 632           160           -74.68%
BenchmarkStructSimpleCustomTypeSuccess-8                56            36            -35.71%
BenchmarkStructSimpleCustomTypeFailure-8                656           640           -2.44%
BenchmarkStructPartialSuccess-8                         352           272           -22.73%
BenchmarkStructPartialFailure-8                         808           730           -9.65%
BenchmarkStructExceptSuccess-8                          314           250           -20.38%
BenchmarkStructExceptFailure-8                          352           272           -22.73%
BenchmarkStructSimpleCrossFieldSuccess-8                96            80            -16.67%
BenchmarkStructSimpleCrossFieldFailure-8                552           536           -2.90%
BenchmarkStructSimpleCrossStructCrossFieldSuccess-8     136           112           -17.65%
BenchmarkStructSimpleCrossStructCrossFieldFailure-8     600           576           -4.00%
BenchmarkStructSimpleSuccess-8                          24            4             -83.33%
BenchmarkStructSimpleFailure-8                          656           640           -2.44%
BenchmarkStructSimpleSuccessParallel-8                  24            4             -83.33%
BenchmarkStructSimpleFailureParallel-8                  656           640           -2.44%
BenchmarkStructComplexSuccess-8                         392           244           -37.76%
BenchmarkStructComplexFailure-8                         3745          3609          -3.63%
BenchmarkStructComplexSuccessParallel-8                 392           244           -37.76%
BenchmarkStructComplexFailureParallel-8                 3745          3609          -3.63%

```
2016-07-18 09:06:08 -04:00
joeybloggs
80301d1184 fix go report card badge. 2016-07-14 17:11:36 -04:00
joeybloggs
49d9b2c35e Merge branch 'minor-perf-merge' into minor-perf-1 2016-07-14 17:06:10 -04:00
joeybloggs
99a0f5e141 Merge branch 'merge' into minor-perf-merge
# Conflicts:
#	util.go
#	validator.go
#	validator_test.go
2016-07-14 17:06:03 -04:00