fasttrips.Performance¶
-
class
fasttrips.
Performance
[source]¶ Bases:
object
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.
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 -
add_info
(iteration, pathfinding_iteration, person_id, person_trip_id, perf_dict)[source]¶ Add this row to the performance dict of arrays. Assumes time values are in milliseconds.
-
record_step_end
(iteration, pathfinding_iteration, simulation_iteration)[source]¶ Explicitly ends whatever step was happening at this level.
-
record_step_start
(iteration, pathfinding_iteration, simulation_iteration, step_name)[source]¶ Records the step start. If there was previously a step at this level, then ends that and saves the duration of that step.
-
write_pathfinding
(output_dir, append)[source]¶ Writes the pathfinding results to OUTPUT_PERFORMANCE_PF_FILE as a csv.
-
OUTPUT_PERFORMANCE_FILE
= 'ft_output_performance.csv'¶ File to write performance results
-
OUTPUT_PERFORMANCE_PF_FILE
= 'ft_output_performance_pathfinding.csv'¶ File to write performance results
-
PERFORMANCE_COL_END_MEM_MB
= 'end_mem_MB'¶
-
PERFORMANCE_COL_END_TIME
= 'end_time'¶
-
PERFORMANCE_COL_ITERATION
= 'iteration'¶ Performance column: Iteration. Integer.
-
PERFORMANCE_COL_PATHFINDING_ITERATION
= 'pathfinding_iteration'¶ Performance column: Pathfinding Iteration. Integer.
-
PERFORMANCE_COL_SIMULATION_ITERATION
= 'simulation_iteration'¶ Performance column: Simulation Iteration. Integer.
-
PERFORMANCE_COL_START_MEM_MB
= 'start_mem_MB'¶
-
PERFORMANCE_COL_START_TIME
= 'start_time'¶ Performance column: step start time
-
PERFORMANCE_COL_STEP_DURATION
= 'step_duration'¶
-
PERFORMANCE_COL_STEP_NAME
= 'step_name'¶ For general performance (not pathfinding) Performance column: Step name (e.g. read inputs). String.
-
PERFORMANCE_PF_COL_ITERATION
= 'iteration'¶ Performance column: Iteration
-
PERFORMANCE_PF_COL_LABEL_ITERATIONS
= 'label iterations'¶ Performance column: Number of label iterations
-
PERFORMANCE_PF_COL_MAX_STOP_PROCESS_COUNT
= 'max stop process count'¶ Performance column: Maximum number of times a stop was processed
-
PERFORMANCE_PF_COL_MEM_TIMESTAMP
= 'mem_timestamp'¶ Performance column: Timestamp of memory query, in a datetime.datetime
-
PERFORMANCE_PF_COL_NUM_LABELED_STOPS
= 'num labeled stops'¶ Performance column: Number of labeled stops
-
PERFORMANCE_PF_COL_PATHFINDING_ITERATION
= 'pathfinding_iteration'¶ Performance column: Pathfinding Iteration
-
PERFORMANCE_PF_COL_PATHFINDING_STATUS
= 'pathfinding_status'¶ Performance column: Pathfinding status
-
PERFORMANCE_PF_COL_PERSON_ID
= 'person_id'¶ Performance column: Person ID
-
PERFORMANCE_PF_COL_PERSON_TRIP_ID
= 'person_trip_id'¶ Performance column: Person Trip ID
-
PERFORMANCE_PF_COL_PRIVATE_USAGE_BYTES
= 'private usage bytes'¶ Performance column: Private usage in memory, in bytes
-
PERFORMANCE_PF_COL_PROCESS_NUM
= 'process number'¶ Performance column: Process number
-
PERFORMANCE_PF_COL_TIME_ENUMERATING
= 'time enumerating'¶ Performance column: Time spent enumerating (timedelta)
-
PERFORMANCE_PF_COL_TIME_ENUMERATING_MS
= 'time enumerating milliseconds'¶ Performance column: Time spent enumerating (milliseconds)
-
PERFORMANCE_PF_COL_TIME_LABELING
= 'time labeling'¶ Performance column: Time spent labeling (timedelta)
-
PERFORMANCE_PF_COL_TIME_LABELING_MS
= 'time labeling milliseconds'¶ Performance column: Time spent labeling (milliseconds)
-
PERFORMANCE_PF_COL_TRACED
= 'traced'¶ Performance column: Traced, since this affects performance
-
PERFORMANCE_PF_COL_WORKING_SET_BYTES
= 'working set bytes'¶ Performance column: Working set in memory, in bytes
-