Add BoolNum type and test on slow GLS

This commit is contained in:
Dominik Werder
2021-06-24 08:46:56 +02:00
parent 411014d289
commit ef803a45a2
19 changed files with 249 additions and 115 deletions

View File

@@ -316,10 +316,10 @@ pub fn file_content_stream(
async_stream::stream! {
use tokio::io::AsyncReadExt;
loop {
let ts1 = Instant::now();
let mut buf = BytesMut::with_capacity(buffer_size);
let inst1 = Instant::now();
let n1 = file.read_buf(&mut buf).await?;
let inst2 = Instant::now();
let ts2 = Instant::now();
if n1 == 0 {
info!("file EOF");
break;
@@ -327,7 +327,7 @@ pub fn file_content_stream(
else {
let ret = FileChunkRead {
buf,
duration: inst2.duration_since(inst1),
duration: ts2.duration_since(ts1),
};
yield Ok(ret);
}