TraceReader

public interface TraceReader

A basic interface for classes that read specific trace file formats.

Author:Marcos Dias de Assuncao, Manoel Campos da Silva Filho

Methods

getCommentString

String[] getCommentString()

Gets the Strings that identifies the start of a comment line. For instance ; # % //.

getFieldDelimiterRegex

String getFieldDelimiterRegex()

Gets the regex defining how fields are delimited in the trace file. Usually, this can be just a String with a single character such as a space, comma, semi-colon or tab (t).

getFilePath

String getFilePath()

Gets the path of the trace file.

getMaxLinesToRead

int getMaxLinesToRead()

Gets the maximum number of lines of the workload reader that will be read. The value -1 indicates that all lines will be read, creating a cloudlet from every one.

setCommentString

TraceReader setCommentString(String... commentString)

Sets a string that identifies the start of a comment line. If there are multiple ways to comment a line, the different Strings representing comments can be specified as parameters.

Parameters:
  • commentString – the comment Strings to set

setFieldDelimiterRegex

TraceReader setFieldDelimiterRegex(String fieldDelimiterRegex)

Sets the regex defining how fields are delimited in the trace file. Usually, this can be just a String with a single character such as a space, comma or semi-colon or tab (t).

Parameters:
  • fieldDelimiterRegex – the field separator regex to set

setMaxLinesToRead

TraceReader setMaxLinesToRead(int maxLinesToRead)

Sets the maximum number of lines of the workload reader that will be read. The value -1 indicates that all lines will be read, creating a cloudlet from every one.

Parameters:
  • maxLinesToRead – the maximum number of lines to set