讀取特定行我有有這樣如何在Java中
Fri Sep 19 19:16:39 UTC 2014
Test launched. Check every minute for an update
minute 9:
ec2-54-84-5-158.compute-1.amazonaws.com: Requests per second: 926.13 [#/sec] (mean)
----------------------
minute 10:
ec2-54-84-5-158.compute-1.amazonaws.com: Requests per second: 919.23 [#/sec] (mean)
----------------------
minute 11:
ec2-54-209-65-210.compute-1.amazonaws.com: Requests per second: 547.62 [#/sec] (mean)
ec2-54-84-5-158.compute-1.amazonaws.com: Requests per second: 875.14 [#/sec] (mean)
----------------------
minute 12:
ec2-54-209-65-210.compute-1.amazonaws.com: Requests per second: 862.83 [#/sec] (mean)
ec2-54-84-5-158.compute-1.amazonaws.com: Requests per second: 876.78 [#/sec] (mean)
----------------------
minute 13:
ec2-54-209-65-210.compute-1.amazonaws.com: Requests per second: 857.37 [#/sec] (mean)
ec2-54-84-5-158.compute-1.amazonaws.com: Requests per second: 880.64 [#/sec] (mean)
----------------------
它基本上是不斷更新,每分鐘內容的文件。所以我想從這兩個「------------」行之間的最後一個塊獲取最後的數據。最終目的是總結該區塊每秒的請求。你能否引導我應用最好的邏輯?
請注意你的問題標題不是你實際要求的。爲什麼不跟蹤tokenstream的「每秒請求次數」,然後獲取後續號碼? – 2014-09-19 19:45:23
你是指兩條虛線之間的最新值? – 2014-09-19 19:58:35
。只需在最近一分鐘內對每秒的請求進行總計。分鐘13在這種情況下 – 2014-09-19 20:08:01