You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.3 KiB

  1. %% Ignore Msg Hole Name
  2. -define(eTpfHole, '$eTpfHole').
  3. %% 消息截取默认配置项
  4. -define(defTcmMap, #{
  5. tcmIsCut => false
  6. , tcmDepth => 5
  7. , tcmListSize => 32
  8. , tcmMapSize => 32
  9. , tcmTupleSize => 32
  10. , tcmBinSize => 128
  11. , tcmBitSize => 128 * 8
  12. , tcmNestStruct => 6
  13. }).
  14. -define(eTpfTracerId, eTpfTracerId).
  15. %% 类型声明
  16. -export_type([input/0, userInput/0, traceOpts/0, tracerOpts/0]).
  17. -type pattern() :: module() | {app, atom()} | {callback, module(), atom()}.
  18. -type scope() :: {scope, [pid() | port() | all | processes | ports |existing | existing_processes | existing_ports |new | new_processes | new_ports]}.
  19. -type input() :: [pattern() | scope()].
  20. -type userInput() :: pattern() | input().
  21. -type traceOpts() :: #{
  22. mode => trace | profile
  23. , tracerId => any()
  24. , send => boolean()
  25. , running => boolean()
  26. , process_dump => boolean() %% 必需的trace选项 为了生成火焰图,我们目前在跟踪时需要使用一个附加选项。此选项将导致将堆栈跟踪信息添加到调用事件。选项为`process_dump`, 并且必须将其设置为`true`。
  27. }.
  28. -type tracerOpts() :: #{
  29. %% tracer for socket
  30. port => pos_integer()
  31. %% tracer for file
  32. , fDir => string() %% 文件目录
  33. , fBaseName => string() %% 文件base file name
  34. , fMaxSize => pos_integer() %% 最大的文件字节数
  35. , fMaxLog => pos_integer() %% 最大日志数量
  36. , fMaxMsg => pos_integer() %% 最大消息数量
  37. %% tracer for console
  38. %% trace msg term cut cfg
  39. , tcmIsCut => boolean() %% 是否cut trace msg term
  40. , tcmDepth => pos_integer() %% term cut时保留的最大深度
  41. , tcmListSize => pos_integer() %% List term cut时保留的最大数量
  42. , tcmMapSize => pos_integer() %% Map term cut时保留的最大数量
  43. , tcmTupleSize => pos_integer() %% Tuple term cut时保留的最大数量
  44. , tcmBinSize => pos_integer() %% Bin term cut时保留的最大字节数
  45. , tcmBitSize => pos_integer() %% Bits term cut时保留的最大bit数
  46. , tcmNestStruct => pos_integer() %% 复合结构 term cut时保留的最大数量
  47. }.