用lr测试生成的文件,我只统计文件的生成数量以及生成时间;拿数量和执行事务数对比,拿生成时间和请求发出时间对比。作者: haiquan180 时间: 2007-6-28 09:45
我也是这么认为的 可是老外不开壳 非要写个perl脚本作者: qiguojie 时间: 2007-6-28 09:47
我有时间试一下。。lr可以用fopen打开文件,至于怎么比较我就不知道了作者: qiguojie 时间: 2007-6-28 09:50 标题: LR自带的函数说明 long fopen ( const char *filename, const char *access_mode );
filename:The name of the file to open.
access_mode:The type of access mode: r, w, a or r+, w+, a+, where the "+" sign indicates that the file must already exist.
Action() {
int count, total = 0;
char buffer[1000];
long file_stream;
char *filename = "c:\\readme.txt";
/* Open the file with read access */
if ((file_stream = fopen(filename, "r")) == NULL ) {
lr_error_message("Cannot open %s", filename);
return -1;
}
/* Read until end of file */
while (!feof(file_stream)) {
/* Read 1000 bytes while maintaining a running count */
count = fread(buffer, sizeof(char), 1000, file_stream);
lr_output_message("%3d read", count);
/* Check for file I/O errors */
if (ferror(file_stream)) {