-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from bibendi/robin-rabin
feature: rejection of master node. searchd connection pooling
- Loading branch information
Showing
48 changed files
with
1,265 additions
and
1,552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--color | ||
--tty | ||
--format progress | ||
--order random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module Sphinx | ||
module Integration | ||
# A float value which decays exponentially toward 0 over time. | ||
class Decaying | ||
attr_accessor :e | ||
attr_accessor :p | ||
|
||
# opts - Hash | ||
# :p - Float (0.0) The initial value | ||
# :e - Float (Math::E) Exponent base | ||
# :r - Float (Math.log(0.5) / 10) Timescale factor - defaulting to decay 50% every 10 seconds | ||
def initialize(opts = {}) | ||
@p = opts[:p] || 0.0 | ||
@e = opts[:e] || Math::E | ||
@r = opts[:r] || Math.log(0.5) / 10 | ||
@t0 = Time.now | ||
end | ||
|
||
# Add to current value | ||
# | ||
# d - Float value to add | ||
def <<(d) | ||
@p = value + d | ||
end | ||
|
||
# Returns Float the current value (adjusted for the time decay) | ||
def value | ||
return 0.0 unless @p > 0 | ||
now = Time.now | ||
dt = now - @t0 | ||
@t0 = now | ||
@p *= @e**(@r * dt) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 0 additions & 63 deletions
63
lib/sphinx/integration/extensions/riddle/configuration/distributed_index.rb
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
lib/sphinx/integration/extensions/riddle/configuration/searchd.rb
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.