-
Notifications
You must be signed in to change notification settings - Fork 30
Inference Engine Debugging
The local-ie-testing profile exists on the onebusaway-nyc-vehicle-tracking-webapp for debugging purposes, it allows a local bundle to be loaded and run through a debugger. Note that bundles may require large amounts of RAM to load properly, which may in-turn require a 64-bit O/S to address.
The best examples of debugging exist in the integration tests, and the bundles and traces provided by the integration tests. Complete information on how to create a trace for debugging and testing the Inference Engine can be found on the [Inference Engine Traces](Inference Engine Traces) page.
- Get a fresh copy of onebusaway-nyc
user@ubuntu:~src$ git clone git@github:camsys/onebusaway-nyc.git
- From Package Explorer, right-click, choose Import -> Maven -> Existing project and choose ~/src/onebusaway-nyc
- After the import and initial build complete, right-click on onebusaway-nyc-integration-tests, choose Run As, Run Configuration, double click Maven Build, set base directory to be ~/src/onebusaway-nyc/onebusaway-nyc-integration-tests, and Goals: "pre-integration-test", and select run
- The console should indicate bundles are building. This will take some time
- Copy the built bundles to the location the vehicle-tracking-webapp expects them:
sudo mkdir -r /var/lib/obanyc/oba-bundle && sudo chown dev:dev /var/lib/obanyc/oba-bundle && cp -r ~/src/onebusaway-nyc/onebusaway-nyc-integration-tests/target/transit-data-bundle/* /var/lib/obanyc/oba-bundle/
- Right-click on onebusaway-nyc-vehicle-tracking-webapp, select Maven, and add the profile "local-ie-testing", click apply
- (This assumes tomcat-eclipse integration) Open the properties and then launch configuration of Tomcat. Add the following to the arguments:
-Dorg.onebusaway.webapp.port=8080 -Dorg.onebusaway.transit_data_federation_webapp.port=8080 -Xmx6096m -XX:MaxPermSize=256m
- Right-click on onebusaway-nyc-vehicle-tracking-webapp, select Run-as, Run On Server
The
local-ie-testing
profile expects the bundle to be at/var/lib/obanyc/oba-vtw-bundle
.
Skip this section if you are running a typical integration test. SIRI tests introduce a dependency on the NYC webapp.
- Edit to onebusaway-nyc-webapp/src/main/resources/org/onebusaway/nyc/webapp/application-context-webapp.xml, changing the create api key value from OBANYC to TEST
property name="key" value="TEST"
- Right-click on onebusaway-nyc-webapp, select Maven, and add the profile "local-ie", click apply.
- Right-click on onebusaway-nyc-webapp, select Run-as, Run On Server.
- Browse to http://localhost:8080/onebusway-nyc-vehicle-tracking-webapp
- Click Bundle Status
- Select 2012September_Bronx_r10_b03 from the bundle drop down list and click "Change Bundle..."
- Browse back to http://localhost:8080/onebusway-nyc-vehicle-tracking-webapp
- Select Vehicle Simulator
- Select Browse and choose ~/src/onebusaway-nyc/onebusaway-nyc-integration-tests/src/integration-test/resources/traces/324-deadhead-labeled.csv
- Click submit
- Click map to view the trace. Click refresh if trace is not complete
Symbol | Meaning |
---|---|
Green peg | In Progress |
Red peg | Deadhead |
Blue peg | Layover |
Grey with orange dot | In service DSC but inference not in progress |