Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Won't Do
-
3.5.1
-
None
-
None
Description
Introduce a new DebugStrategy which would essentially place the traversal in development mode. It would be added in the Gremlin Console when defining "g" or in a developer’s application code during programming. This approach works nicely for application development because it could be added in a way that doesn’t interfere with the execution of the code allowing tests to run without modification. For example, there would be no need to tack a profile() to the end of a traversal after discovering a problem or a need to take the traversal to a different tool to try to debug it.
g.withStrategy(DebugStrategy) g.withStrategy(new DebugStrategy(verifyEdgeLabelSpecification=true, includeProfile=false)) g.withDebug() - first class??
If your tests all pass in development, the developer would be assured that running the same code in production without DebugStrategy would be safe. DebugStrategy could perhaps always turn on profile() but still return results and preserve the profiling output to be retrieved from the traversal somehow. Some more thought needs to be applied here.