Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Results are one convenient table now
- Loading branch information
Daniel Vartanov
committed
Dec 31, 2009
1 parent
8a7ab4d
commit cbd3edc
Showing
5 changed files
with
52 additions
and
58 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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,15 +1,10 @@ | |||
class TrafficSplitter | class TrafficSplitter | ||
def self.split_traffic!(traffic) | def self.split_traffic!(traffic) | ||
{ | hosts = traffic.daily.internal.highest_five_hosts + | ||
:internal => { | traffic.nightly.internal.highest_five_hosts + | ||
:daily => traffic.daily.internal.highest_ten_hosts, | traffic.daily.world.highest_five_hosts + | ||
:nightly => traffic.nightly.internal.highest_ten_hosts, | traffic.nightly.world.highest_five_hosts | ||
}, | |||
|
|
||
:world => { | hosts.sort { |left, right| right.amount_of_traffic <=> left.amount_of_traffic } | ||
:daily => traffic.daily.world.highest_ten_hosts, | |||
:nightly => traffic.nightly.world.highest_ten_hosts, | |||
} | |||
} | |||
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