T-142: edits made in the worktree
This commit is contained in:
parent
de4763de56
commit
8304acc4da
1 changed files with 17 additions and 25 deletions
|
|
@ -281,7 +281,23 @@ where
|
|||
}
|
||||
let group_len = group_end - read_idx;
|
||||
|
||||
if group_len == 1 {
|
||||
let retain_group = if group_len == 1 {
|
||||
true
|
||||
} else {
|
||||
let first = &rows[read_idx];
|
||||
let all_identical = rows[read_idx + 1..group_end]
|
||||
.iter()
|
||||
.all(|other| bar_1m_values_bit_eq(first, other));
|
||||
if all_identical {
|
||||
stats.listing_collision_collapsed += group_len - 1;
|
||||
true
|
||||
} else {
|
||||
stats.listing_collision_dropped += group_len;
|
||||
false
|
||||
}
|
||||
};
|
||||
|
||||
if retain_group {
|
||||
if write_idx != read_idx {
|
||||
rows.swap(write_idx, read_idx);
|
||||
}
|
||||
|
|
@ -295,30 +311,6 @@ where
|
|||
IntradaySession::Post => stats.post_rows_out += 1,
|
||||
}
|
||||
write_idx += 1;
|
||||
} else {
|
||||
let first = &rows[read_idx];
|
||||
let all_identical = rows[read_idx + 1..group_end]
|
||||
.iter()
|
||||
.all(|other| bar_1m_values_bit_eq(first, other));
|
||||
|
||||
if all_identical {
|
||||
stats.listing_collision_collapsed += group_len - 1;
|
||||
if write_idx != read_idx {
|
||||
rows.swap(write_idx, read_idx);
|
||||
}
|
||||
if last_listing_id != Some(listing_id) {
|
||||
stats.listings_out += 1;
|
||||
last_listing_id = Some(listing_id);
|
||||
}
|
||||
match rows[write_idx].session {
|
||||
IntradaySession::Pre => stats.pre_rows_out += 1,
|
||||
IntradaySession::Rth => stats.rth_rows_out += 1,
|
||||
IntradaySession::Post => stats.post_rows_out += 1,
|
||||
}
|
||||
write_idx += 1;
|
||||
} else {
|
||||
stats.listing_collision_dropped += group_len;
|
||||
}
|
||||
}
|
||||
|
||||
read_idx = group_end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue