Showing 1 of 2 files from the diff.
Other files ignored by Codecov
csv2tsv/README.md has changed.

@@ -195,12 +195,50 @@
Loading
195 195
    }
196 196
}
197 197
198 +
/** csv2tsvFiles takes a list of input files and passes each to csv2tsv, which
199 +
 * runs on a single file. csv2tsvFiles manages header lines and sets up the
200 +
 * BufferedOutputRange passed to csv2tsv.
201 +
 */
198 202
void csv2tsvFiles(const ref Csv2tsvOptions cmdopt, const string[] inputFiles)
199 203
{
200 204
    import tsv_utils.common.utils : BufferedOutputRange;
201 205
202 -
    ubyte[1024 * 128] fileRawBuf;
203 -
    auto stdoutWriter = BufferedOutputRange!(typeof(stdout))(stdout);
206 +
    /* Buffer Sizes
207 +
     *
208 +
     * ReadBufferSize is the typical size used for buffered reads by most tsv-utils
209 +
     * programs. Nothing unusal there. However, the default sizes used by
210 +
     * BufferedOutputRange are overridden to allocate a larger initial buffer (the
211 +
     * reserve size) and to ensure buffers are flushed to standard output more
212 +
     * quickly (the max size).
213 +
     *
214 +
     * BufferedOutputRange is intended primarily for record oriented writes, where
215 +
     * output ends in newlines. When given a string ending in a newline, the buffer
216 +
     * is flushed if it is greater than 'flush size'. Otherwise buffers are flushed
217 +
     * after exceeding 'max size'.
218 +
     *
219 +
     * For csv2tsv's buffered conversion algorithm there are two very different cases:
220 +
     * 1) Extensive use of CSV escapes, where all fields are quoted.
221 +
     * 2) Limited use of CSV escapes, where few fields are quoted.
222 +
     *
223 +
     * The first case will translate to record oriented writes. In particular, if the
224 +
     * first field is quoted, the write to BufferedOutputRange will be on a newline
225 +
     * boundary. (A quoted field pushes accumulated data to BufferedOutputRange.) For
226 +
     * this case, the default flush behavior of BufferedOutputRange works well.
227 +
     *
228 +
     * In the second case, data gets pushed to BufferedOutputRange on arbitrary byte
229 +
     * boundaries. BufferedOutputRange won't flush to standard output until max size
230 +
     * bytes have been accumulated. The default max size is larger than optimal, so
231 +
     * instead max size is set to a size similar to the read buffer size. Reserve
232 +
     * is increased for the same reason.
233 +
     */
234 +
    enum ReadBufferSize = 1024L * 128L;
235 +
    enum OutputBufferFlushSize = 1024L * 10L;
236 +
    enum OutputBufferReserveSize = 1024L * 129L;
237 +
    enum OutputBufferMaxSize = 1024L * 128L;
238 +
239 +
    ubyte[ReadBufferSize] fileRawBuf;
240 +
    auto stdoutWriter = BufferedOutputRange!(typeof(stdout))(
241 +
        stdout, OutputBufferFlushSize, OutputBufferReserveSize, OutputBufferMaxSize);
204 242
    bool firstFile = true;
205 243
206 244
    foreach (filename; (inputFiles.length > 0) ? inputFiles : ["-"])
@@ -219,7 +257,7 @@
Loading
219 257
    }
220 258
}
221 259
222 -
/* csv2tsv buffered conversion approach
260 +
/* csv2tsv buffered conversion algorithm
223 261
224 262
This version of csv2tsv uses a buffered approach to csv-to-tsv conversion. This is a
225 263
change from the original version, which used a character-at-a-time approach, with
@@ -415,7 +453,6 @@
Loading
415 453
 *
416 454
 * The chunks are returned as an input range.
417 455
 */
418 -
419 456
auto inputSourceByChunk(InputSource)(InputSource source, size_t size)
420 457
{
421 458
    return inputSourceByChunk(source, new ubyte[](size));
991.1
TRAVIS_OS_NAME=linux
990.1
TRAVIS_OS_NAME=linux
1
comment:
2
  layout: "diff, files"
3
  require_changes: yes
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading