Time estimator: Added consumed memory tracing, replaced std::map

with std::vector for lower memory consumption.
This commit is contained in:
bubnikv 2018-12-18 14:10:31 +01:00
parent d6b8ed3e3e
commit bffcaeff41
4 changed files with 31 additions and 7 deletions

View file

@ -209,7 +209,8 @@ namespace Slic3r {
typedef std::map<Block::EMoveType, MoveStats> MovesStatsMap;
#endif // ENABLE_MOVE_STATS
typedef std::map<unsigned int, unsigned int> G1LineIdToBlockIdMap;
typedef std::pair<unsigned int, unsigned int> G1LineIdToBlockId;
typedef std::vector<G1LineIdToBlockId> G1LineIdToBlockIdMap;
private:
EMode _mode;
@ -338,6 +339,9 @@ namespace Slic3r {
// Returns the estimated time, in minutes (integer)
std::string get_time_minutes() const;
// Return an estimate of the memory consumed by the time estimator.
size_t memory_used() const;
private:
void _reset();
void _reset_time();