History log of /external/fio/exp/test-expression-parser.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
79dc914fcf76e8f6c8f8e20dc75bd424cc833d27 11-Nov-2014 Stephen M. Cameron <stephenmcameron@gmail.com> Fixup some of the time (usec) based conversions

Modified by Jens to fixup some of the mtime/utime confusion,
and add a specific ->is_time to options to get rid of future
issues in this area.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/test-expression-parser.c
64c9d60b95a121b4d7a4ca3b0fdf2390236d17b2 30-Sep-2014 Stephen M. Cameron <stephenmcameron@gmail.com> enable informing arithmetic parser of implicit units

This is so that "runtime=100" can be interpreted as 100 seconds
rather than 100 microseconds, but runtime=(100ms + 100s) can also
get the right answer (in microseconds).

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/test-expression-parser.c
7ab38ba91dccf94261f3db27708e2f540af2eaed 30-Sep-2014 Stephen M. Cameron <stephenmcameron@gmail.com> do not call fprintf from yyerror in expression parser

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/test-expression-parser.c
e27dadccdc0e438f2d86f2a843b6e24355033328 29-Sep-2014 Jens Axboe <axboe@fb.com> Wire up exp/test-expression-parser

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/test-expression-parser.c
c3805eb1451972285565504e11be642f082fe7df 29-Sep-2014 Stephen M. Cameron <stephenmcameron@gmail.com> fio: support suffixes in expression parser

Note that time values in expressions by default have units of microseconds

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/test-expression-parser.c
88b635b84d831b109f0807922449fa7a900f5dbd 29-Sep-2014 Stephen M. Cameron <stephenmcameron@gmail.com> fio: allow arithmetic expressions to be used in job files

However, the arithmetic expressions must be enclosed in parentheses.
That is not a hard requirement, I just did it that way to enable the old
code to be used for the existing job files, to reduce risk of breaking
something that previously worked.

Known issues:

1) if overflow or underflow occurs during the evaluation of arithmetic
expressions, it is not detected. Likewise, detection of floating point
divide by zero is a bit iffy. Calculations are carried out both as long
longs and as integers. If at any point, a double precision floating
point value is used, floating point values are used, and for the final
long long calculation the double is cast to a long long.

There may be other numeric subtleties lurking as well. These kind of
things are why I require the parentheses to invoke the arithmetic
processing.

2) I made no effort to work this code into the autoconf system. Have no
idea how to do that, esp. with lex and yacc involved in this.

3) Suffixes (k, M, GiB, etc.) do not work with expressions. It is
probably not very difficult to fix this.

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>

Modified by me to make configure auto-detect presence of yacc/lex and
enable the arithmetic only if those conditions are met. Also got rid
of the Makefile in exp/ and added the targets to the general Makefile,
since this makes it easier to do properly.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/test-expression-parser.c