Debug.ecl 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*##############################################################################
  2. ## HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®. All rights reserved.
  3. ############################################################################## */
  4. /* Some internal functions implemented in the run time support library which can be useful */
  5. rtl := SERVICE
  6. unsigned4 msTick() : eclrtl,library='eclrtl',entrypoint='rtlTick';
  7. unsigned4 sleep(unsigned4 _delay) : eclrtl,action,library='eclrtl',entrypoint='rtlSleep';
  8. printStackReport(integer startIP) : cpp,action,library='jlib';
  9. END;
  10. import lib_parselib;
  11. RETURN MODULE
  12. /*
  13. * Pauses processing by sleeping for a while.
  14. *
  15. * @param millis The time in milliseconds to sleep for.
  16. */
  17. EXPORT Sleep(integer millis) := EVALUATE(rtl.Sleep(millis));
  18. /*
  19. * Returns a millisecond count of elapsed time.
  20. *
  21. */
  22. EXPORT UNSIGNED4 msTick() := rtl.msTick();
  23. /*
  24. * Returns a textual representation of the parse tree for a pattern match.
  25. * It may be useful for debugging PARSE operations.
  26. * It uses square brackets (such as: a[b[c]d] ) to indicate nesting. This attribute is only valid
  27. * within the RECORD or TRANSFORM structure that defines the result of a PARSE operation.
  28. */
  29. EXPORT STRING getParseTree() := lib_parselib.ParseLib.getParseTree();
  30. /*
  31. * Returns an xml representation of the parse tree for a pattern match.
  32. * It may be useful for debugging PARSE operations. This attribute is only valid
  33. * within the RECORD or TRANSFORM structure that defines the result of a PARSE operation.
  34. */
  35. EXPORT STRING getXmlParseTree() := lib_parselib.ParseLib.getXmlParseTree();
  36. /*
  37. * Cause the current stack to be traced to the logging. Used for debugging platform issues.
  38. */
  39. EXPORT PrintStackReport() := rtl.printStackReport(0);
  40. END;