Merge branch '17-appending-to-dataframes-is-slow' into 'master'
Resolve "Appending to dataframes is slow" Closes #17 See merge request micro-ROS/ros_tracing/tracetools_analysis!19
This commit is contained in:
commit
5b8d27e720
3 changed files with 3 additions and 3 deletions
|
@ -49,7 +49,7 @@ class CpuTimeDataModel(DataModel):
|
||||||
'duration': duration,
|
'duration': duration,
|
||||||
'cpu_id': cpu_id,
|
'cpu_id': cpu_id,
|
||||||
}
|
}
|
||||||
self.times.loc[len(self.times.index)] = data
|
self.times = self.times.append(data, ignore_index=True)
|
||||||
|
|
||||||
def print_model(self) -> None:
|
def print_model(self) -> None:
|
||||||
"""Debug method to print every contained df."""
|
"""Debug method to print every contained df."""
|
||||||
|
|
|
@ -59,7 +59,7 @@ class ProfileDataModel(DataModel):
|
||||||
'duration': duration,
|
'duration': duration,
|
||||||
'actual_duration': actual_duration,
|
'actual_duration': actual_duration,
|
||||||
}
|
}
|
||||||
self.times.loc[len(self.times.index)] = data
|
self.times = self.times.append(data, ignore_index=True)
|
||||||
|
|
||||||
def print_model(self) -> None:
|
def print_model(self) -> None:
|
||||||
"""Debug method to print every contained df."""
|
"""Debug method to print every contained df."""
|
||||||
|
|
|
@ -143,7 +143,7 @@ class RosDataModel(DataModel):
|
||||||
'duration': duration,
|
'duration': duration,
|
||||||
'intra_process': intra_process,
|
'intra_process': intra_process,
|
||||||
}
|
}
|
||||||
self.callback_instances.loc[len(self.callback_instances.index)] = data
|
self.callback_instances = self.callback_instances.append(data, ignore_index=True)
|
||||||
|
|
||||||
def print_model(self) -> None:
|
def print_model(self) -> None:
|
||||||
"""Debug method to print every contained df."""
|
"""Debug method to print every contained df."""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue