fasttrips.Performance

class fasttrips.Performance[source]

Performance class. Keeps track of performance information (time spent, number of labeling iterations, etc) related to pathfinding in Fast-Trips and for the the bigger loops.

__init__()[source]

Constructor. Initialize empty dataframe for performance info.

Methods

__init__()

Constructor.

add_info(iteration, pathfinding_iteration, ...)

Add this row to the performance dict of arrays.

record_step_end(iteration, ...)

Explicitly ends whatever step was happening at this level.

record_step_start(iteration, ...)

Records the step start.

write(output_dir)

Writes the results to OUTPUT_PERFORMANCE_FILE as a csv.

write_pathfinding(output_dir, append)

Writes the pathfinding results to OUTPUT_PERFORMANCE_PF_FILE as a csv.

Attributes

OUTPUT_PERFORMANCE_FILE

File to write performance results

OUTPUT_PERFORMANCE_PF_FILE

File to write performance results

PERFORMANCE_COL_END_MEM_MB

PERFORMANCE_COL_END_TIME

PERFORMANCE_COL_ITERATION

Performance column: Iteration.

PERFORMANCE_COL_PATHFINDING_ITERATION

Performance column: Pathfinding Iteration.

PERFORMANCE_COL_SIMULATION_ITERATION

Performance column: Simulation Iteration.

PERFORMANCE_COL_START_MEM_MB

PERFORMANCE_COL_START_TIME

Performance column: step start time

PERFORMANCE_COL_STEP_DURATION

PERFORMANCE_COL_STEP_NAME

For general performance (not pathfinding) Performance column: Step name (e.g.

PERFORMANCE_PF_COL_ITERATION

Performance column: Iteration

PERFORMANCE_PF_COL_LABEL_ITERATIONS

Performance column: Number of label iterations

PERFORMANCE_PF_COL_MAX_STOP_PROCESS_COUNT

Performance column: Maximum number of times a stop was processed

PERFORMANCE_PF_COL_MEM_TIMESTAMP

Performance column: Timestamp of memory query, in a datetime.datetime

PERFORMANCE_PF_COL_NUM_LABELED_STOPS

Performance column: Number of labeled stops

PERFORMANCE_PF_COL_PATHFINDING_ITERATION

Performance column: Pathfinding Iteration

PERFORMANCE_PF_COL_PATHFINDING_STATUS

Performance column: Pathfinding status

PERFORMANCE_PF_COL_PERSON_ID

Performance column: Person ID

PERFORMANCE_PF_COL_PERSON_TRIP_ID

Performance column: Person Trip ID

PERFORMANCE_PF_COL_PRIVATE_USAGE_BYTES

Performance column: Private usage in memory, in bytes

PERFORMANCE_PF_COL_PROCESS_NUM

Performance column: Process number

PERFORMANCE_PF_COL_TIME_ENUMERATING

Performance column: Time spent enumerating (timedelta)

PERFORMANCE_PF_COL_TIME_ENUMERATING_MS

Performance column: Time spent enumerating (milliseconds)

PERFORMANCE_PF_COL_TIME_LABELING

Performance column: Time spent labeling (timedelta)

PERFORMANCE_PF_COL_TIME_LABELING_MS

Performance column: Time spent labeling (milliseconds)

PERFORMANCE_PF_COL_TRACED

Performance column: Traced, since this affects performance

PERFORMANCE_PF_COL_WORKING_SET_BYTES

Performance column: Working set in memory, in bytes