Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contractor: log stats for loaded speed files #2440

Merged
merged 1 commit into from
May 24, 2016
Merged

Conversation

freenerd
Copy link
Member

@freenerd freenerd commented May 20, 2016

Fixes #2434

Output looks like this:

[info] Opening /tmp/extract.osrm.ebg
[info] Reading 702 edges from the edge based graph
[info] Loaded speed file /tmp/speeds.csv with 2 speeds
[info] In total loaded 1 speed file(s) with a total of 2 unique values
[info] Used 3382 speeds from LUA profile or input map
[info] Used 2 speeds from /tmp/speeds.csv

Todo:

  • Figure out what the high number in speeds from LUA profile means (one way streets are a thing)
  • Code review

@freenerd freenerd force-pushed the contractor-speed-logs branch from e3330b9 to c3ee201 Compare May 20, 2016 22:00
@TheMarex
Copy link
Member

@freenerd build is failing on travis. Seems like you forgot to include atomic somewhere.

@daniel-j-h
Copy link
Member

For the record: https://gcc.gnu.org/ml/libstdc++/2015-01/msg00121.html
We need to workaround GCC 4.8's libstdc++ not defining atomic_init.

@freenerd freenerd force-pushed the contractor-speed-logs branch from c3ee201 to 08f3a0b Compare May 23, 2016 17:17
@daniel-j-h
Copy link
Member

@freenerd if you want to use relaxed memory orders:
08f3a0b#diff-5d25f965a92c5af3a4dfd03cf4f7616aR501
then it would make sense to fetch_add for incrementing the counters with relaxed instead of += 1:
http://en.cppreference.com/w/cpp/atomic/atomic/fetch_add

@freenerd freenerd force-pushed the contractor-speed-logs branch 2 times, most recently from 95e2d4c to a787743 Compare May 23, 2016 19:44
@freenerd
Copy link
Member Author

@daniel-j-h using std::memory_order_seq_cst which should work okay?

@daniel-j-h
Copy link
Member

store(0); for initialization is good enough, as store has sequential consistency as default second argument already: http://en.cppreference.com/w/cpp/atomic/atomic/store

@freenerd freenerd force-pushed the contractor-speed-logs branch from a787743 to 4423d6e Compare May 23, 2016 20:04
@TheMarex TheMarex added this to the 5.2.0 milestone May 23, 2016
@freenerd freenerd force-pushed the contractor-speed-logs branch from eb07ac1 to a21fd2e Compare May 24, 2016 18:35
@TheMarex TheMarex merged commit a21fd2e into master May 24, 2016
@TheMarex TheMarex deleted the contractor-speed-logs branch May 24, 2016 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants