-
Notifications
You must be signed in to change notification settings - Fork 180
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
Faster time decoder #20
Commits on Apr 30, 2018
-
Added a C implementation of the SimpleDecoder's timestamp decode func…
…tions when using ruby >= 2.3 - SimpleDecoder::TimestampWithTimeZone::decode - SimpleDecoder::TimestampWithoutTimeZone::decode
Configuration menu - View commit details
-
Copy full SHA for 98610b1 - Browse repository at this point
Copy the full SHA 98610b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb36158 - Browse repository at this point
Copy the full SHA cb36158View commit details -
SimpleDecoder's timestamp decode function return the original string …
…when the string can't be parsed.
Configuration menu - View commit details
-
Copy full SHA for 2c26094 - Browse repository at this point
Copy the full SHA 2c26094View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9cf1c29 - Browse repository at this point
Copy the full SHA 9cf1c29View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97d8440 - Browse repository at this point
Copy the full SHA 97d8440View commit details -
- Don't fail when the time is more precise than processed - Shorten some expect-series. - Change Spaces->Tabs. - Add a test case for leap-seconds.
Configuration menu - View commit details
-
Copy full SHA for 5c87b38 - Browse repository at this point
Copy the full SHA 5c87b38View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d273d4 - Browse repository at this point
Copy the full SHA 2d273d4View commit details -
Timestamp-Decoder: Use Time.new on Windows instead of rb_time_timespe…
…c_new() Both _mkgmtime() as well as mktime() return errors with certain dates. This path is approx. 10 times slower, compared with rb_time_timespec_new(). Its still 10 times faster than the previous RegExp way.
Configuration menu - View commit details
-
Copy full SHA for be07045 - Browse repository at this point
Copy the full SHA be07045View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ba476d - Browse repository at this point
Copy the full SHA 4ba476dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 450c075 - Browse repository at this point
Copy the full SHA 450c075View commit details -
TextDecoder: better test for timegm() - it's a non-std GNU extension
Also fall through to the slow path, because it fails on Android (using termux) with certain time values otherwise: Failures: 1) PG::Type derivations PG::SimpleCoder#decode timestamps decodes timestamps with date before 1823 Failure/Error: expect( textdec_timestamp.decode('1822-01-02 23:23:59.123456') ). to be_within(0.000001).of( Time.new(1822,01,02, 23, 23, 59.123456) ) expected "1822-01-02 23:23:59.123456" to be within 1.0e-06 of 1822-01-02 23:23:59 +0100, but it could not be treated as a numeric value # ./spec/pg/type_spec.rb:125:in `block (5 levels) in <top (required)>' # ./spec/helpers.rb:31:in `block in included' 2) PG::Type derivations PG::SimpleCoder#decode timestamps decodes timestamps with date after 2116 Failure/Error: expect( textdec_timestamp.decode('2117-01-02 23:23:59.123456') ). to be_within(0.000001).of( Time.new(2117,01,02, 23, 23, 59.123456) ) expected "2117-01-02 23:23:59.123456" to be within 1.0e-06 of 2117-01-02 23:23:59 +0100, but it could not be treated as a numeric value # ./spec/pg/type_spec.rb:129:in `block (5 levels) in <top (required)>' # ./spec/helpers.rb:31:in `block in included' Finished in 1 minute 19.47 seconds (files took 1.27 seconds to load) 386 examples, 2 failures, 1 pending
Configuration menu - View commit details
-
Copy full SHA for 7aac3ec - Browse repository at this point
Copy the full SHA 7aac3ecView commit details