1. per_packet / first_packet 執行順序
會先做一次per_packet, 在while不進入(因為 ts > local->nextreport 一直沒有成立), 再換first_packet, 最後再一直執行per_packet
但問題是不應該先做per_packet
在per_packet 執行期間,會有很多次的dump_result,其結果未依照設定的10秒時間間隔進行。
Offline / Inline Time 不同造成
2. 多threads 因執行時間不同故不照順序印出
3. 多表格相加
4. 使用 local counter 不用 global counter
最上面的global counter 都加到 localdata 的 struct 中
先把interval變數沒變跟1 thread 順序修完後再來處理
You don't have to worry about how packets get from the hasher to the processing thread.
You don't have to worry about making sure you have an exclusive lock on a packet or a result before looking at it.
You don't have to manage any buffers or queues.
5. Interval 1 數字不會變化
6. per_packet內部變數如packet count未正確計算@line 943/944
//count_packet_interval += 1;
local->count += 1;uint32_t count_packet_interval = 0; // packet count in an interval
問題2_圖片