json_pure 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/CHANGES +9 -0
  2. data/Rakefile +47 -53
  3. data/VERSION +1 -1
  4. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log +52 -0
  5. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat +1000 -0
  6. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat +1001 -0
  7. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat +900 -0
  8. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat +901 -0
  9. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat +1000 -0
  10. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat +1001 -0
  11. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log +261 -0
  12. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat +1000 -0
  13. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat +1001 -0
  14. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat +1000 -0
  15. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat +1001 -0
  16. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat +1000 -0
  17. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat +1001 -0
  18. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log +262 -0
  19. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat +1000 -0
  20. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat +1001 -0
  21. data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log +82 -0
  22. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log +34 -0
  23. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat +900 -0
  24. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat +901 -0
  25. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log +81 -0
  26. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat +1000 -0
  27. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat +1001 -0
  28. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log +82 -0
  29. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat +1000 -0
  30. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat +1001 -0
  31. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log +82 -0
  32. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat +1000 -0
  33. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat +1001 -0
  34. data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log +82 -0
  35. data/benchmarks/generator_benchmark.rb +162 -0
  36. data/benchmarks/parser_benchmark.rb +193 -0
  37. data/bin/edit_json.rb +0 -1
  38. data/bin/prettify_json.rb +0 -1
  39. data/doc-templates/main.txt +284 -0
  40. data/ext/json/ext/generator/extconf.rb +2 -0
  41. data/ext/json/ext/generator/generator.c +62 -18
  42. data/ext/json/ext/parser/extconf.rb +2 -0
  43. data/ext/json/ext/parser/parser.c +128 -81
  44. data/ext/json/ext/parser/parser.rl +31 -7
  45. data/ext/json/ext/parser/unicode.c +4 -4
  46. data/lib/json/add/core.rb +1 -1
  47. data/lib/json/editor.rb +11 -2
  48. data/lib/json/ext.rb +2 -0
  49. data/lib/json/pure/generator.rb +77 -41
  50. data/lib/json/pure/parser.rb +6 -2
  51. data/lib/json/pure.rb +2 -0
  52. data/lib/json/version.rb +1 -1
  53. data/lib/json.rb +0 -221
  54. data/tests/test_json.rb +7 -4
  55. data/tests/test_json_addition.rb +8 -5
  56. data/tests/test_json_fixtures.rb +6 -2
  57. data/tests/test_json_generate.rb +8 -2
  58. data/tests/test_json_rails.rb +30 -2
  59. data/tests/test_json_unicode.rb +8 -7
  60. data/tools/fuzz.rb +0 -1
  61. data/tools/server.rb +0 -1
  62. metadata +46 -9
  63. data/benchmarks/benchmark.txt +0 -133
  64. data/benchmarks/benchmark_generator.rb +0 -48
  65. data/benchmarks/benchmark_parser.rb +0 -26
  66. data/benchmarks/benchmark_rails.rb +0 -26
  67. data/tests/runner.rb +0 -25
@@ -0,0 +1,82 @@
1
+ ========================== 2009-04-01T16:46:56 CEST ===========================
2
+ Benchmarking on ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux].
3
+ Running 'ParserBenchmarkRails' for 1000 iterations/method (compare_time=real)
4
+ ===============================================================================
5
+
6
+ This first run is only for warmup.
7
+ ParserBenchmarkRails#parser:
8
+ real total user system
9
+ sum 38.690086126 38.620000000 38.610000000 0.010000000
10
+ min 0.031255007 0.030000000 0.030000000 0.000000000
11
+ std- 0.025022178 0.024277709 0.024265187 -0.000306228
12
+ mean 0.038690086 0.038620000 0.038610000 0.000010000
13
+ std+ 0.052357994 0.052962291 0.052954813 0.000326228
14
+ max 0.083594084 0.090000000 0.090000000 0.010000000
15
+ std 0.013667908 0.014342291 0.014344813 0.000316228
16
+ std% 35.326641197 37.136951469 37.153104057 3162.277660168
17
+ harm 0.035964441 0.035345750 0.035335342 nan
18
+ geo 0.037048388 0.036703287 0.036692729 0.000000000
19
+ q1 0.032610178 0.030000000 0.030000000 0.000000000
20
+ med 0.033129930 0.030000000 0.030000000 0.000000000
21
+ q3 0.035388470 0.040000000 0.040000000 0.000000000
22
+ 1000 25.84641 0.038690086
23
+ calls calls/sec secs/call
24
+
25
+ 0.08098 -|*
26
+ 0.07574 -|*****
27
+ 0.07051 -|**
28
+ 0.06528 -|
29
+ 0.06004 -|
30
+ 0.05481 -|
31
+ 0.04957 -|
32
+ 0.04434 -|*
33
+ 0.03911 -|***
34
+ 0.03387 -|**************************************************
35
+
36
+ Outliers detected with box plot algo (median=0.03313, iqr=0.00278, factor=3.00):
37
+ high=47 very_high=124
38
+
39
+ Ljung-Box statistics: q=5276.52020 (alpha=0.05, df=50).
40
+ 1.00000 >= 0.95000 => Autocorrelation was detected.
41
+
42
+ ParserBenchmarkRails#parser:
43
+ real total user system
44
+ sum 38.814780235 38.730000000 38.710000000 0.020000000
45
+ min 0.031314850 0.030000000 0.030000000 0.000000000
46
+ std- 0.024801114 0.023975177 0.023956914 -0.000426990
47
+ mean 0.038814780 0.038730000 0.038710000 0.000020000
48
+ std+ 0.052828447 0.053484823 0.053463086 0.000466990
49
+ max 0.085337162 0.090000000 0.090000000 0.010000000
50
+ std 0.014013666 0.014754823 0.014753086 0.000446990
51
+ std% 36.103943796 38.096625621 38.111821850 2234.948544149
52
+ harm 0.035975867 0.035320781 0.035304155 nan
53
+ geo 0.037101026 0.036725170 0.036706415 0.000000000
54
+ q1 0.032611191 0.030000000 0.030000000 0.000000000
55
+ med 0.033082008 0.030000000 0.030000000 0.000000000
56
+ q3 0.035308182 0.040000000 0.040000000 0.000000000
57
+ 1000 25.76338 0.038814780
58
+ calls calls/sec secs/call
59
+
60
+ 0.08264 -|*
61
+ 0.07723 -|***
62
+ 0.07183 -|****
63
+ 0.06643 -|
64
+ 0.06103 -|
65
+ 0.05562 -|
66
+ 0.05022 -|
67
+ 0.04482 -|
68
+ 0.03942 -|**
69
+ 0.03402 -|**************************************************
70
+
71
+ Outliers detected with box plot algo (median=0.03308, iqr=0.00270, factor=3.00):
72
+ high=43 very_high=127
73
+
74
+ Ljung-Box statistics: q=3451.96535 (alpha=0.05, df=50).
75
+ 1.00000 >= 0.95000 => Autocorrelation was detected.
76
+
77
+ No initial data truncated.
78
+ => System may have been in a steady state from the beginning.
79
+ ========================== 2009-04-01T16:48:17 CEST ===========================
80
+
81
+ Writing measurement data file '/data/scm/json/benchmarks/data/ParserBenchmarkRails#parser.dat'.
82
+ Writing autocorrelation plot file '/data/scm/json/benchmarks/data/ParserBenchmarkRails#parser-autocorrelation.dat'.