Remove timestamp file
This commit is contained in:
parent
2b010fc6f3
commit
bed53f5fd5
@ -17,6 +17,7 @@
|
||||
- `OSRM` object accepts a new option `memory_file` that stores the memory in a file on disk.
|
||||
- Internals
|
||||
- CHANGED #4845 #4968: Updated segregated intersection identification
|
||||
- REMOVED: Remove `.timestamp` file since it was unused.
|
||||
- Documentation:
|
||||
- ADDED: Add documentation about OSM node ids in nearest service response [#4436](https://github.com/Project-OSRM/osrm-backend/pull/4436)
|
||||
- Performance
|
||||
|
@ -233,16 +233,6 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
|
||||
exclude_mask = m_profile_properties->excludable_classes[exclude_index];
|
||||
}
|
||||
|
||||
void InitializeTimestampPointer(storage::DataLayout &data_layout, char *memory_block)
|
||||
{
|
||||
auto timestamp_ptr =
|
||||
data_layout.GetBlockPtr<char>(memory_block, storage::DataLayout::TIMESTAMP);
|
||||
m_timestamp.resize(data_layout.GetBlockSize(storage::DataLayout::TIMESTAMP));
|
||||
std::copy(timestamp_ptr,
|
||||
timestamp_ptr + data_layout.GetBlockSize(storage::DataLayout::TIMESTAMP),
|
||||
m_timestamp.begin());
|
||||
}
|
||||
|
||||
void InitializeChecksumPointer(storage::DataLayout &data_layout, char *memory_block)
|
||||
{
|
||||
m_check_sum =
|
||||
@ -543,7 +533,6 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
|
||||
InitializeEdgeInformationPointers(data_layout, memory_block);
|
||||
InitializeTurnPenalties(data_layout, memory_block);
|
||||
InitializeGeometryPointers(data_layout, memory_block);
|
||||
InitializeTimestampPointer(data_layout, memory_block);
|
||||
InitializeNamePointers(data_layout, memory_block);
|
||||
InitializeTurnLaneDescriptionsPointers(data_layout, memory_block);
|
||||
InitializeProfilePropertiesPointer(data_layout, memory_block, exclude_index);
|
||||
@ -851,8 +840,6 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
|
||||
return m_datasources->GetSourceName(id);
|
||||
}
|
||||
|
||||
std::string GetTimestamp() const override final { return m_timestamp; }
|
||||
|
||||
bool GetContinueStraightDefault() const override final
|
||||
{
|
||||
return m_profile_properties->continue_straight_at_waypoint;
|
||||
|
@ -173,8 +173,6 @@ class BaseDataFacade
|
||||
|
||||
virtual StringView GetExitsForID(const NameID id) const = 0;
|
||||
|
||||
virtual std::string GetTimestamp() const = 0;
|
||||
|
||||
virtual bool GetContinueStraightDefault() const = 0;
|
||||
|
||||
virtual double GetMapMatchingMaxSpeed() const = 0;
|
||||
|
@ -52,7 +52,6 @@ struct ExtractorConfig final : storage::IOConfig
|
||||
".osrm.names",
|
||||
".osrm.tls",
|
||||
".osrm.tld",
|
||||
".osrm.timestamp",
|
||||
".osrm.geometry",
|
||||
".osrm.nbg_nodes",
|
||||
".osrm.ebg_nodes",
|
||||
|
@ -50,7 +50,6 @@ const constexpr char *block_id_to_name[] = {"IGNORE_BLOCK",
|
||||
"GEOMETRIES_FWD_DATASOURCES_LIST",
|
||||
"GEOMETRIES_REV_DATASOURCES_LIST",
|
||||
"HSGR_CHECKSUM",
|
||||
"TIMESTAMP",
|
||||
"FILE_INDEX_PATH",
|
||||
"DATASOURCES_NAMES",
|
||||
"PROPERTIES",
|
||||
@ -131,7 +130,6 @@ class DataLayout
|
||||
GEOMETRIES_FWD_DATASOURCES_LIST,
|
||||
GEOMETRIES_REV_DATASOURCES_LIST,
|
||||
HSGR_CHECKSUM,
|
||||
TIMESTAMP,
|
||||
FILE_INDEX_PATH,
|
||||
DATASOURCES_NAMES,
|
||||
PROPERTIES,
|
||||
|
@ -54,7 +54,6 @@ struct StorageConfig final : IOConfig
|
||||
".osrm.fileIndex",
|
||||
".osrm.edges",
|
||||
".osrm.geometry",
|
||||
".osrm.timestamp",
|
||||
".osrm.turn_weight_penalties",
|
||||
".osrm.turn_duration_penalties",
|
||||
".osrm.datasource_names",
|
||||
|
@ -407,11 +407,6 @@ Extractor::ParseOSMData(ScriptingEnvironment &scripting_environment,
|
||||
timestamp = "n/a";
|
||||
}
|
||||
util::Log() << "timestamp: " << timestamp;
|
||||
|
||||
storage::io::FileWriter timestamp_file(config.GetPath(".osrm.timestamp"),
|
||||
storage::io::FileWriter::GenerateFingerprint);
|
||||
|
||||
timestamp_file.WriteFrom(timestamp.c_str(), timestamp.length());
|
||||
}
|
||||
|
||||
// Extraction containers and restriction parser
|
||||
|
@ -257,14 +257,6 @@ void Storage::PopulateLayout(DataLayout &layout)
|
||||
make_block<std::uint64_t>(tree_levels_size));
|
||||
}
|
||||
|
||||
// read timestampsize
|
||||
{
|
||||
io::FileReader timestamp_file(config.GetPath(".osrm.timestamp"),
|
||||
io::FileReader::VerifyFingerprint);
|
||||
const auto timestamp_size = timestamp_file.GetSize();
|
||||
layout.SetBlock(DataLayout::TIMESTAMP, make_block<char>(timestamp_size));
|
||||
}
|
||||
|
||||
std::unordered_map<std::string, DataLayout::BlockID> name_to_block_id = {
|
||||
{"/mld/multilevelgraph/node_array", DataLayout::MLD_GRAPH_NODE_LIST},
|
||||
{"/mld/multilevelgraph/edge_array", DataLayout::MLD_GRAPH_EDGE_LIST},
|
||||
@ -642,18 +634,6 @@ void Storage::PopulateData(const DataLayout &layout, char *memory_ptr)
|
||||
turn_duration_penalties);
|
||||
}
|
||||
|
||||
// store timestamp
|
||||
{
|
||||
io::FileReader timestamp_file(config.GetPath(".osrm.timestamp"),
|
||||
io::FileReader::VerifyFingerprint);
|
||||
const auto timestamp_size = timestamp_file.GetSize();
|
||||
|
||||
const auto timestamp_ptr =
|
||||
layout.GetBlockPtr<char, true>(memory_ptr, DataLayout::TIMESTAMP);
|
||||
BOOST_ASSERT(timestamp_size == layout.GetBlockEntries(DataLayout::TIMESTAMP));
|
||||
timestamp_file.ReadInto(timestamp_ptr, timestamp_size);
|
||||
}
|
||||
|
||||
// store search tree portion of rtree
|
||||
{
|
||||
io::FileReader tree_node_file(config.GetPath(".osrm.ramIndex"),
|
||||
|
@ -219,7 +219,6 @@ class MockBaseDataFacade : public engine::datafacade::BaseDataFacade
|
||||
StringView GetDestinationsForID(const NameID) const override final { return {}; }
|
||||
StringView GetExitsForID(const NameID) const override final { return {}; }
|
||||
|
||||
std::string GetTimestamp() const override { return ""; }
|
||||
bool GetContinueStraightDefault() const override { return true; }
|
||||
double GetMapMatchingMaxSpeed() const override { return 180 / 3.6; }
|
||||
const char *GetWeightName() const override final { return "duration"; }
|
||||
|
Loading…
Reference in New Issue
Block a user