Ticket #19454

mk_rateの高速化

오픈 날짜: 2009-11-04 19:35 마지막 업데이트: 2009-11-08 22:49

Reporter:
소유자:
Status:
Closed
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
None

Details

(1) mkrate の grep 関数で add しているところで代わりに

  $stdout.printf("%s %s %s %s %d\n", black_mark, black_id, white_id, white_mark, time)
として、一旦中間データに変換する

(2) 続いてgrepの部分を

 if /^([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) ([0-9]+)$/ =~ str.strip then
    add($1,$2,$3,$4,Time.at($5.to_i))
  end

などとして中間データを読んでレートを計算する

中間データを再利用することで2009年11月現在のfloodgateのデータで 5分 => 12秒 の高速化になるので、 現状の動作に加えて、(1)だけ行う、(2)だけ行うためのオプションを作成してほしい。

(ハットが上付き文字の意味になってしまったので修正)

Ticket History (3/5 Histories)

2009-11-04 19:35 Updated by: tkaneko
  • New Ticket "mk_rateの高速化" created
2009-11-04 19:37 Updated by: tkaneko
  • Details Updated
2009-11-06 13:06 Updated by: tkaneko
댓글 올리기

中間データ利用の場合は、最近14日以外は無視するのもcsa-filterではなく、mk_rateにいれたい

+  how_long_days = (Time.now - time)/(3600*24)
+  if (how_long_days > $options["ignore"])
+    return
+  end

+    ["--ignore",  GetoptLong::REQUIRED_ARGUMENT],

+  $options["ignore"] ||= 365*2
+  $options["ignore"] = $options["ignore"].to_i

2009-11-08 22:42 Updated by: beatles
  • 소유자 Update from (None) to beatles
2009-11-08 22:49 Updated by: beatles
  • Status Update from Open to Closed
  • Ticket Close date is changed to 2009-11-08 22:49
댓글 올리기

fixed at r355

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login