aboutsummaryrefslogtreecommitdiff
path: root/sys/libbio/test.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-05-15 18:11:58 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-05-15 18:11:58 -0700
commitfa25c8f3df6791727b9384c9b405c996ac68b8ab (patch)
treea7a2a627b0deb612472138f389fe533761a01f0e /sys/libbio/test.c
parent05aeef535ac60ccca81fe58bc6a0152ca80bc211 (diff)
feat: added buffered io to libn
Diffstat (limited to 'sys/libbio/test.c')
-rw-r--r--sys/libbio/test.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/sys/libbio/test.c b/sys/libbio/test.c
index da29c84..b7cbae1 100644
--- a/sys/libbio/test.c
+++ b/sys/libbio/test.c
@@ -3,7 +3,6 @@
#include <libbio.h>
#include <time.h>
-#include "kseq.h"
// -----------------------------------------------------------------------
// Global data
@@ -83,8 +82,6 @@ my_read(Stream *s, void *buf, int n)
return io·read(s, 1, n, buf);
}
-KSEQ_INIT(Stream*, my_read)
-
// -----------------------------------------------------------------------
// Point of entry for testing
@@ -198,23 +195,8 @@ test·fastq()
clock_t t;
- int n, slen;
- kseq_t *kseq;
-
fd = io·open("/home/nolln/root/data/test/eg.fq", "r");
- t = clock();
- kseq = kseq_init(fd);
- while (kseq_read(kseq) >= 0) {
- ++n, slen += kseq->seq.l;
- }
- t = clock() - t;
- printf("heng's fastq code took %f ms to execute\n", 1000.*t/CLOCKS_PER_SEC);
-
- kseq_destroy(kseq);
-
- io·seek(fd, 0, seek·set);
-
rdr = bio·openfastq((io·Reader){.read = &io·read}, fd, mem·sys, nil);
t = clock();