micromegas 0.1.9__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. micromegas-0.2.0/PKG-INFO +247 -0
  2. micromegas-0.2.0/README.md +225 -0
  3. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/client.py +6 -63
  4. micromegas-0.2.0/micromegas/thirdparty/perfetto/protos/perfetto/config/test_config_pb2.py +38 -0
  5. micromegas-0.2.0/micromegas/thirdparty/perfetto/protos/perfetto/trace/test_event_pb2.py +39 -0
  6. {micromegas-0.1.9 → micromegas-0.2.0}/pyproject.toml +1 -1
  7. micromegas-0.1.9/PKG-INFO +0 -25
  8. micromegas-0.1.9/README.md +0 -3
  9. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/__init__.py +0 -0
  10. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/perfetto.py +0 -0
  11. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/request.py +0 -0
  12. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/common/android_energy_consumer_descriptor_pb2.py +0 -0
  13. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/common/android_log_constants_pb2.py +0 -0
  14. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/common/builtin_clock_pb2.py +0 -0
  15. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/common/descriptor_pb2.py +0 -0
  16. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/common/gpu_counter_descriptor_pb2.py +0 -0
  17. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/common/perf_events_pb2.py +0 -0
  18. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/common/protolog_common_pb2.py +0 -0
  19. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/common/sys_stats_counters_pb2.py +0 -0
  20. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/common/trace_stats_pb2.py +0 -0
  21. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/android/android_game_intervention_list_config_pb2.py +0 -0
  22. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/android/android_input_event_config_pb2.py +0 -0
  23. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/android/android_log_config_pb2.py +0 -0
  24. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/android/android_polled_state_config_pb2.py +0 -0
  25. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/android/android_sdk_sysprop_guard_config_pb2.py +0 -0
  26. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/android/android_system_property_config_pb2.py +0 -0
  27. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/android/network_trace_config_pb2.py +0 -0
  28. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/android/packages_list_config_pb2.py +0 -0
  29. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/android/pixel_modem_config_pb2.py +0 -0
  30. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/android/protolog_config_pb2.py +0 -0
  31. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/android/surfaceflinger_layers_config_pb2.py +0 -0
  32. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/android/surfaceflinger_transactions_config_pb2.py +0 -0
  33. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/chrome/chrome_config_pb2.py +0 -0
  34. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/chrome/v8_config_pb2.py +0 -0
  35. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/data_source_config_pb2.py +0 -0
  36. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/etw/etw_config_pb2.py +0 -0
  37. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/ftrace/ftrace_config_pb2.py +0 -0
  38. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/gpu/gpu_counter_config_pb2.py +0 -0
  39. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/gpu/vulkan_memory_config_pb2.py +0 -0
  40. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/inode_file/inode_file_config_pb2.py +0 -0
  41. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/interceptor_config_pb2.py +0 -0
  42. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/interceptors/console_config_pb2.py +0 -0
  43. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/power/android_power_config_pb2.py +0 -0
  44. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/process_stats/process_stats_config_pb2.py +0 -0
  45. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/profiling/heapprofd_config_pb2.py +0 -0
  46. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/profiling/java_hprof_config_pb2.py +0 -0
  47. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/profiling/perf_event_config_pb2.py +0 -0
  48. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/statsd/atom_ids_pb2.py +0 -0
  49. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/statsd/statsd_tracing_config_pb2.py +0 -0
  50. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/sys_stats/sys_stats_config_pb2.py +0 -0
  51. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/system_info/system_info_pb2.py +0 -0
  52. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/trace_config_pb2.py +0 -0
  53. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/config/track_event/track_event_config_pb2.py +0 -0
  54. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/android_game_intervention_list_pb2.py +0 -0
  55. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/android_log_pb2.py +0 -0
  56. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/android_system_property_pb2.py +0 -0
  57. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/camera_event_pb2.py +0 -0
  58. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/frame_timeline_event_pb2.py +0 -0
  59. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/gpu_mem_event_pb2.py +0 -0
  60. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/graphics/rect_pb2.py +0 -0
  61. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/graphics_frame_event_pb2.py +0 -0
  62. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/initial_display_state_pb2.py +0 -0
  63. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/network_trace_pb2.py +0 -0
  64. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/packages_list_pb2.py +0 -0
  65. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/pixel_modem_events_pb2.py +0 -0
  66. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/protolog_pb2.py +0 -0
  67. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/shell_transition_pb2.py +0 -0
  68. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/surfaceflinger_common_pb2.py +0 -0
  69. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/surfaceflinger_layers_pb2.py +0 -0
  70. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/surfaceflinger_transactions_pb2.py +0 -0
  71. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/android/winscope_extensions_pb2.py +0 -0
  72. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/chrome/chrome_benchmark_metadata_pb2.py +0 -0
  73. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/chrome/chrome_metadata_pb2.py +0 -0
  74. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/chrome/chrome_trace_event_pb2.py +0 -0
  75. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/chrome/chrome_trigger_pb2.py +0 -0
  76. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/chrome/v8_pb2.py +0 -0
  77. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/clock_snapshot_pb2.py +0 -0
  78. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/etw/etw_event_bundle_pb2.py +0 -0
  79. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/etw/etw_event_pb2.py +0 -0
  80. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/etw/etw_pb2.py +0 -0
  81. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/extension_descriptor_pb2.py +0 -0
  82. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/filesystem/inode_file_map_pb2.py +0 -0
  83. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/android_fs_pb2.py +0 -0
  84. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/binder_pb2.py +0 -0
  85. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/block_pb2.py +0 -0
  86. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/cgroup_pb2.py +0 -0
  87. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/clk_pb2.py +0 -0
  88. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/cma_pb2.py +0 -0
  89. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/compaction_pb2.py +0 -0
  90. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/cpuhp_pb2.py +0 -0
  91. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/cros_ec_pb2.py +0 -0
  92. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/dcvsh_pb2.py +0 -0
  93. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/dma_fence_pb2.py +0 -0
  94. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/dmabuf_heap_pb2.py +0 -0
  95. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/dpu_pb2.py +0 -0
  96. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/drm_pb2.py +0 -0
  97. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/ext4_pb2.py +0 -0
  98. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/f2fs_pb2.py +0 -0
  99. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/fastrpc_pb2.py +0 -0
  100. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/fence_pb2.py +0 -0
  101. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/filemap_pb2.py +0 -0
  102. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/ftrace_event_bundle_pb2.py +0 -0
  103. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/ftrace_event_pb2.py +0 -0
  104. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/ftrace_pb2.py +0 -0
  105. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/ftrace_stats_pb2.py +0 -0
  106. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/g2d_pb2.py +0 -0
  107. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/generic_pb2.py +0 -0
  108. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/google_icc_trace_pb2.py +0 -0
  109. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/google_irm_trace_pb2.py +0 -0
  110. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/gpu_mem_pb2.py +0 -0
  111. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/gpu_scheduler_pb2.py +0 -0
  112. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/hyp_pb2.py +0 -0
  113. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/i2c_pb2.py +0 -0
  114. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/ion_pb2.py +0 -0
  115. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/ipi_pb2.py +0 -0
  116. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/irq_pb2.py +0 -0
  117. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/kgsl_pb2.py +0 -0
  118. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/kmem_pb2.py +0 -0
  119. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/kvm_pb2.py +0 -0
  120. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/lowmemorykiller_pb2.py +0 -0
  121. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/lwis_pb2.py +0 -0
  122. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/mali_pb2.py +0 -0
  123. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/mdss_pb2.py +0 -0
  124. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/mm_event_pb2.py +0 -0
  125. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/net_pb2.py +0 -0
  126. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/oom_pb2.py +0 -0
  127. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/panel_pb2.py +0 -0
  128. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/perf_trace_counters_pb2.py +0 -0
  129. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/power_pb2.py +0 -0
  130. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/printk_pb2.py +0 -0
  131. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/raw_syscalls_pb2.py +0 -0
  132. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/regulator_pb2.py +0 -0
  133. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/rpm_pb2.py +0 -0
  134. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/samsung_pb2.py +0 -0
  135. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/sched_pb2.py +0 -0
  136. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/scm_pb2.py +0 -0
  137. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/sde_pb2.py +0 -0
  138. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/signal_pb2.py +0 -0
  139. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/skb_pb2.py +0 -0
  140. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/sock_pb2.py +0 -0
  141. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/sync_pb2.py +0 -0
  142. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/synthetic_pb2.py +0 -0
  143. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/systrace_pb2.py +0 -0
  144. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/task_pb2.py +0 -0
  145. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/tcp_pb2.py +0 -0
  146. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/thermal_exynos_pb2.py +0 -0
  147. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/thermal_pb2.py +0 -0
  148. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/trusty_pb2.py +0 -0
  149. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/ufs_pb2.py +0 -0
  150. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/v4l2_pb2.py +0 -0
  151. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/virtio_gpu_pb2.py +0 -0
  152. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/virtio_video_pb2.py +0 -0
  153. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/vmscan_pb2.py +0 -0
  154. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ftrace/workqueue_pb2.py +0 -0
  155. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/gpu/gpu_counter_event_pb2.py +0 -0
  156. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/gpu/gpu_log_pb2.py +0 -0
  157. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/gpu/gpu_render_stage_event_pb2.py +0 -0
  158. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/gpu/vulkan_api_event_pb2.py +0 -0
  159. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/gpu/vulkan_memory_event_pb2.py +0 -0
  160. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/interned_data/interned_data_pb2.py +0 -0
  161. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/memory_graph_pb2.py +0 -0
  162. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/perfetto/perfetto_metatrace_pb2.py +0 -0
  163. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/perfetto/tracing_service_event_pb2.py +0 -0
  164. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/power/android_energy_estimation_breakdown_pb2.py +0 -0
  165. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/power/android_entity_state_residency_pb2.py +0 -0
  166. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/power/battery_counters_pb2.py +0 -0
  167. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/power/power_rails_pb2.py +0 -0
  168. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/profiling/deobfuscation_pb2.py +0 -0
  169. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/profiling/heap_graph_pb2.py +0 -0
  170. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/profiling/profile_common_pb2.py +0 -0
  171. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/profiling/profile_packet_pb2.py +0 -0
  172. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/profiling/smaps_pb2.py +0 -0
  173. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ps/process_stats_pb2.py +0 -0
  174. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ps/process_tree_pb2.py +0 -0
  175. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/remote_clock_sync_pb2.py +0 -0
  176. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/statsd/statsd_atom_pb2.py +0 -0
  177. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/sys_stats/sys_stats_pb2.py +0 -0
  178. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/system_info/cpu_info_pb2.py +0 -0
  179. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/system_info_pb2.py +0 -0
  180. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/trace_packet_defaults_pb2.py +0 -0
  181. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/trace_packet_pb2.py +0 -0
  182. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/trace_pb2.py +0 -0
  183. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/trace_uuid_pb2.py +0 -0
  184. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_active_processes_pb2.py +0 -0
  185. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_application_state_info_pb2.py +0 -0
  186. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_compositor_scheduler_state_pb2.py +0 -0
  187. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_content_settings_event_info_pb2.py +0 -0
  188. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_frame_reporter_pb2.py +0 -0
  189. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_histogram_sample_pb2.py +0 -0
  190. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_keyed_service_pb2.py +0 -0
  191. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_latency_info_pb2.py +0 -0
  192. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_legacy_ipc_pb2.py +0 -0
  193. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_message_pump_pb2.py +0 -0
  194. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_mojo_event_info_pb2.py +0 -0
  195. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_process_descriptor_pb2.py +0 -0
  196. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_renderer_scheduler_state_pb2.py +0 -0
  197. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_thread_descriptor_pb2.py +0 -0
  198. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_user_event_pb2.py +0 -0
  199. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/chrome_window_handle_event_info_pb2.py +0 -0
  200. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/counter_descriptor_pb2.py +0 -0
  201. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/debug_annotation_pb2.py +0 -0
  202. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/log_message_pb2.py +0 -0
  203. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/pixel_modem_pb2.py +0 -0
  204. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/process_descriptor_pb2.py +0 -0
  205. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/range_of_interest_pb2.py +0 -0
  206. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/screenshot_pb2.py +0 -0
  207. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/source_location_pb2.py +0 -0
  208. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/task_execution_pb2.py +0 -0
  209. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/thread_descriptor_pb2.py +0 -0
  210. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/track_descriptor_pb2.py +0 -0
  211. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/track_event/track_event_pb2.py +0 -0
  212. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/translation/translation_table_pb2.py +0 -0
  213. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/trigger_pb2.py +0 -0
  214. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/thirdparty/perfetto/protos/perfetto/trace/ui_state_pb2.py +0 -0
  215. {micromegas-0.1.9 → micromegas-0.2.0}/micromegas/time.py +0 -0
@@ -0,0 +1,247 @@
1
+ Metadata-Version: 2.1
2
+ Name: micromegas
3
+ Version: 0.2.0
4
+ Summary: Python analytics client for https://github.com/madesroches/micromegas/
5
+ Author: Marc-Antoine Desroches
6
+ Author-email: madesroches@gmail.com
7
+ Requires-Python: >=3.10,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Requires-Dist: cbor2 (>=5.6.3,<6.0.0)
13
+ Requires-Dist: crc (>=7.0.0,<8.0.0)
14
+ Requires-Dist: pandas (>=2.2.2,<3.0.0)
15
+ Requires-Dist: protobuf (>=5.27.1,<6.0.0)
16
+ Requires-Dist: pyarrow (>=16.0.0,<17.0.0)
17
+ Requires-Dist: requests (>=2.31.0,<3.0.0)
18
+ Requires-Dist: tabulate (>=0.9.0,<0.10.0)
19
+ Requires-Dist: tqdm (>=4.66.5,<5.0.0)
20
+ Description-Content-Type: text/markdown
21
+
22
+ # Micromegas
23
+
24
+ Python analytics client for https://github.com/madesroches/micromegas/
25
+
26
+ ## Example usage
27
+
28
+ Query the most recent 2 log entries from the analytics service
29
+
30
+ ```python
31
+ import datetime
32
+ import pandas as pd
33
+ import micromegas
34
+
35
+ BASE_URL = "http://localhost:8082/"
36
+ client = micromegas.client.Client(BASE_URL)
37
+ sql = """
38
+ SELECT time, process_id, level, target, msg
39
+ FROM log_entries
40
+ WHERE level <= 4
41
+ AND exe LIKE '%analytics%'
42
+ ORDER BY time DESC
43
+ LIMIT 2
44
+ """
45
+
46
+ now = datetime.datetime.now(datetime.timezone.utc)
47
+ begin = now - datetime.timedelta(minutes=2)
48
+ end = now
49
+ client.query(sql, begin, end)
50
+ ```
51
+
52
+ | | time | process_id | level | target | msg |
53
+ |---:|:------------------------------------|:-------------------------------------|--------:|:---------------------------------------|:--------------------------------------------|
54
+ | 0 | 2024-10-03 18:17:56.087543714+00:00 | 1db06afc-1c88-47d1-81b3-f398c5f93616 | 4 | acme_telemetry::trace_middleware | response status=200 OK uri=/analytics/query |
55
+ | 1 | 2024-10-03 18:17:53.924037729+00:00 | 1db06afc-1c88-47d1-81b3-f398c5f93616 | 4 | micromegas_analytics::lakehouse::query | query sql= |
56
+ | | | | | | SELECT time, process_id, level, target, msg |
57
+ | | | | | | FROM log_entries |
58
+ | | | | | | WHERE level <= 4 |
59
+ | | | | | | AND exe LIKE '%analytics%' |
60
+ | | | | | | ORDER BY time DESC |
61
+ | | | | | | LIMIT 2 |
62
+
63
+
64
+ Query the 10 slowest top level spans in a trace within a specified time window
65
+
66
+ ```python
67
+ sql = """
68
+ SELECT begin, end, duration, name
69
+ FROM view_instance('thread_spans', '{stream_id}')
70
+ WHERE depth=1
71
+ ORDER BY duration DESC
72
+ LIMIT 10
73
+ ;""".format(stream_id=stream_id)
74
+ client.query(sql, begin_spans, end_spans)
75
+ ```
76
+
77
+ | | begin | end | duration | name |
78
+ |---:|:------------------------------------|:------------------------------------|-----------:|:------------------|
79
+ | 0 | 2024-10-03 18:00:59.308952900+00:00 | 2024-10-03 18:00:59.371890+00:00 | 62937100 | FEngineLoop::Tick |
80
+ | 1 | 2024-10-03 18:00:58.752476800+00:00 | 2024-10-03 18:00:58.784389+00:00 | 31912200 | FEngineLoop::Tick |
81
+ | 2 | 2024-10-03 18:00:58.701507300+00:00 | 2024-10-03 18:00:58.731479500+00:00 | 29972200 | FEngineLoop::Tick |
82
+ | 3 | 2024-10-03 18:00:59.766343100+00:00 | 2024-10-03 18:00:59.792513700+00:00 | 26170600 | FEngineLoop::Tick |
83
+ | 4 | 2024-10-03 18:00:59.282902100+00:00 | 2024-10-03 18:00:59.308952500+00:00 | 26050400 | FEngineLoop::Tick |
84
+ | 5 | 2024-10-03 18:00:59.816034500+00:00 | 2024-10-03 18:00:59.841376900+00:00 | 25342400 | FEngineLoop::Tick |
85
+ | 6 | 2024-10-03 18:00:58.897813100+00:00 | 2024-10-03 18:00:58.922769700+00:00 | 24956600 | FEngineLoop::Tick |
86
+ | 7 | 2024-10-03 18:00:59.860637+00:00 | 2024-10-03 18:00:59.885523700+00:00 | 24886700 | FEngineLoop::Tick |
87
+ | 8 | 2024-10-03 18:00:58.630051300+00:00 | 2024-10-03 18:00:58.654871500+00:00 | 24820200 | FEngineLoop::Tick |
88
+ | 9 | 2024-10-03 18:00:57.952279800+00:00 | 2024-10-03 18:00:57.977024+00:00 | 24744200 | FEngineLoop::Tick |
89
+
90
+ ## SQL reference
91
+
92
+ The Micromegas analytics service is built on Apache DataFusion, please see [Apache DataFusion SQL Reference](https://datafusion.apache.org/user-guide/sql/index.html) for details.
93
+
94
+ ## View sets
95
+
96
+ All view instances in a set have the same schema. Some view instances are global (their view_instance_id is 'global').
97
+ Global view instances are implicitly accessible to SQL queries. Non-global view instances are accessible using the table function `view_instance`.
98
+
99
+ ### log_entries
100
+
101
+ ```python
102
+ client.query("DESCRIBE log_entries")
103
+ ```
104
+ | | column_name | data_type | is_nullable |
105
+ |---:|:--------------|:--------------------------------------|:--------------|
106
+ | 0 | process_id | Dictionary(Int16, Utf8) | NO |
107
+ | 1 | exe | Dictionary(Int16, Utf8) | NO |
108
+ | 2 | username | Dictionary(Int16, Utf8) | NO |
109
+ | 3 | computer | Dictionary(Int16, Utf8) | NO |
110
+ | 4 | time | Timestamp(Nanosecond, Some("+00:00")) | NO |
111
+ | 5 | target | Dictionary(Int16, Utf8) | NO |
112
+ | 6 | level | Int32 | NO |
113
+ | 7 | msg | Utf8 | NO |
114
+
115
+
116
+ #### log_entries view instances
117
+ The implicit use of the `log_entries` table corresponds to the 'global' instance, which contains the log entries of all the processes.
118
+
119
+ Except the 'global' instance, the instance_id refers to any process_id. `view_instance('log_entries', process_id)` contains that process's log. Process-specific views are materialized just-in-time and can provide much better query performance compared to the global instance.
120
+
121
+ ### measures
122
+
123
+ ```python
124
+ client.query("DESCRIBE measures")
125
+ ```
126
+ | | column_name | data_type | is_nullable |
127
+ |---:|:--------------|:--------------------------------------|:--------------|
128
+ | 0 | process_id | Dictionary(Int16, Utf8) | NO |
129
+ | 1 | exe | Dictionary(Int16, Utf8) | NO |
130
+ | 2 | username | Dictionary(Int16, Utf8) | NO |
131
+ | 3 | computer | Dictionary(Int16, Utf8) | NO |
132
+ | 4 | time | Timestamp(Nanosecond, Some("+00:00")) | NO |
133
+ | 5 | target | Dictionary(Int16, Utf8) | NO |
134
+ | 6 | name | Dictionary(Int16, Utf8) | NO |
135
+ | 7 | unit | Dictionary(Int16, Utf8) | NO |
136
+ | 8 | value | Float64 | NO |
137
+
138
+
139
+ #### measures view instances
140
+
141
+ The implicit use of the `measures` table corresponds to the 'global' instance, which contains the metrics of all the processes.
142
+
143
+ Except the 'global' instance, the instance_id refers to any process_id. `view_instance('measures', process_id)` contains that process's metrics. Process-specific views are materialized just-in-time and can provide much better query performance compared to the 'global' instance.
144
+
145
+ ### thread_spans
146
+
147
+ | | column_name | data_type | is_nullable |
148
+ |---:|:--------------|:--------------------------------------|:--------------|
149
+ | 0 | id | Int64 | NO |
150
+ | 1 | parent | Int64 | NO |
151
+ | 2 | depth | UInt32 | NO |
152
+ | 3 | hash | Uint32 | NO |
153
+ | 4 | begin | Timestamp(Nanosecond, Some("+00:00")) | NO |
154
+ | 5 | end | Timestamp(Nanosecond, Some("+00:00")) | NO |
155
+ | 6 | duration | Int64 | NO |
156
+ | 7 | name | Dictionary(Int16, Utf8) | NO |
157
+ | 8 | target | Dictionary(Int16, Utf8) | NO |
158
+ | 9 | filename | Dictionary(Int16, Utf8) | NO |
159
+ | 10| line | UInt32 | NO |
160
+
161
+ #### thread_spans view instances
162
+
163
+ There is no 'global' instance in the 'thread_spans' view set, there is therefore no implicit thread_spans table availble.
164
+ Users can call the table function `view_instance('thread_spans', stream_id)` to query the spans in the thread associated with the specified stream_id.
165
+
166
+
167
+ ### processes
168
+
169
+ ```python
170
+ client.query("DESCRIBE processes")
171
+ ```
172
+ | | column_name | data_type | is_nullable |
173
+ |---:|:------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------|
174
+ | 0 | process_id | Utf8 | NO |
175
+ | 1 | exe | Utf8 | NO |
176
+ | 2 | username | Utf8 | NO |
177
+ | 3 | realname | Utf8 | NO |
178
+ | 4 | computer | Utf8 | NO |
179
+ | 5 | distro | Utf8 | NO |
180
+ | 6 | cpu_brand | Utf8 | NO |
181
+ | 7 | tsc_frequency | Int64 | NO |
182
+ | 8 | start_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
183
+ | 9 | start_ticks | Int64 | NO |
184
+ | 10 | insert_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
185
+ | 11 | parent_process_id | Utf8 | NO |
186
+ | 12 | properties | List(Field { name: "Property", data_type: Struct([Field { name: "key", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "value", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) | NO |
187
+
188
+
189
+ There is only one instance in this view set and it is implicitly available.
190
+
191
+
192
+ ### streams
193
+
194
+ ```python
195
+ client.query("DESCRIBE streams")
196
+ ```
197
+ | | column_name | data_type | is_nullable |
198
+ |---:|:----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------|
199
+ | 0 | stream_id | Utf8 | NO |
200
+ | 1 | process_id | Utf8 | NO |
201
+ | 2 | dependencies_metadata | Binary | NO |
202
+ | 3 | objects_metadata | Binary | NO |
203
+ | 4 | tags | List(Field { name: "tag", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) | YES |
204
+ | 5 | properties | List(Field { name: "Property", data_type: Struct([Field { name: "key", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "value", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) | NO |
205
+ | 6 | insert_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
206
+
207
+ There is only one instance in this view set and it is implicitly available.
208
+
209
+ ### blocks
210
+
211
+
212
+ ```python
213
+ client.query("DESCRIBE blocks")
214
+ ```
215
+
216
+ | | column_name | data_type | is_nullable |
217
+ |---:|:------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------|
218
+ | 0 | block_id | Utf8 | NO |
219
+ | 1 | stream_id | Utf8 | NO |
220
+ | 2 | process_id | Utf8 | NO |
221
+ | 3 | begin_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
222
+ | 4 | begin_ticks | Int64 | NO |
223
+ | 5 | end_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
224
+ | 6 | end_ticks | Int64 | NO |
225
+ | 7 | nb_objects | Int32 | NO |
226
+ | 8 | object_offset | Int64 | NO |
227
+ | 9 | payload_size | Int64 | NO |
228
+ | 10 | insert_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
229
+ | 11 | streams.dependencies_metadata | Binary | NO |
230
+ | 12 | streams.objects_metadata | Binary | NO |
231
+ | 13 | streams.tags | List(Field { name: "tag", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) | YES |
232
+ | 14 | streams.properties | List(Field { name: "Property", data_type: Struct([Field { name: "key", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "value", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) | NO |
233
+ | 15 | processes.start_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
234
+ | 16 | processes.start_ticks | Int64 | NO |
235
+ | 17 | processes.tsc_frequency | Int64 | NO |
236
+ | 18 | processes.exe | Utf8 | NO |
237
+ | 19 | processes.username | Utf8 | NO |
238
+ | 20 | processes.realname | Utf8 | NO |
239
+ | 21 | processes.computer | Utf8 | NO |
240
+ | 22 | processes.distro | Utf8 | NO |
241
+ | 23 | processes.cpu_brand | Utf8 | NO |
242
+ | 24 | processes.insert_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
243
+ | 25 | processes.parent_process_id | Utf8 | NO |
244
+ | 26 | processes.properties | List(Field { name: "Property", data_type: Struct([Field { name: "key", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "value", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) | NO |
245
+
246
+ There is only one instance in this view set and it is implicitly available.
247
+
@@ -0,0 +1,225 @@
1
+ # Micromegas
2
+
3
+ Python analytics client for https://github.com/madesroches/micromegas/
4
+
5
+ ## Example usage
6
+
7
+ Query the most recent 2 log entries from the analytics service
8
+
9
+ ```python
10
+ import datetime
11
+ import pandas as pd
12
+ import micromegas
13
+
14
+ BASE_URL = "http://localhost:8082/"
15
+ client = micromegas.client.Client(BASE_URL)
16
+ sql = """
17
+ SELECT time, process_id, level, target, msg
18
+ FROM log_entries
19
+ WHERE level <= 4
20
+ AND exe LIKE '%analytics%'
21
+ ORDER BY time DESC
22
+ LIMIT 2
23
+ """
24
+
25
+ now = datetime.datetime.now(datetime.timezone.utc)
26
+ begin = now - datetime.timedelta(minutes=2)
27
+ end = now
28
+ client.query(sql, begin, end)
29
+ ```
30
+
31
+ | | time | process_id | level | target | msg |
32
+ |---:|:------------------------------------|:-------------------------------------|--------:|:---------------------------------------|:--------------------------------------------|
33
+ | 0 | 2024-10-03 18:17:56.087543714+00:00 | 1db06afc-1c88-47d1-81b3-f398c5f93616 | 4 | acme_telemetry::trace_middleware | response status=200 OK uri=/analytics/query |
34
+ | 1 | 2024-10-03 18:17:53.924037729+00:00 | 1db06afc-1c88-47d1-81b3-f398c5f93616 | 4 | micromegas_analytics::lakehouse::query | query sql= |
35
+ | | | | | | SELECT time, process_id, level, target, msg |
36
+ | | | | | | FROM log_entries |
37
+ | | | | | | WHERE level <= 4 |
38
+ | | | | | | AND exe LIKE '%analytics%' |
39
+ | | | | | | ORDER BY time DESC |
40
+ | | | | | | LIMIT 2 |
41
+
42
+
43
+ Query the 10 slowest top level spans in a trace within a specified time window
44
+
45
+ ```python
46
+ sql = """
47
+ SELECT begin, end, duration, name
48
+ FROM view_instance('thread_spans', '{stream_id}')
49
+ WHERE depth=1
50
+ ORDER BY duration DESC
51
+ LIMIT 10
52
+ ;""".format(stream_id=stream_id)
53
+ client.query(sql, begin_spans, end_spans)
54
+ ```
55
+
56
+ | | begin | end | duration | name |
57
+ |---:|:------------------------------------|:------------------------------------|-----------:|:------------------|
58
+ | 0 | 2024-10-03 18:00:59.308952900+00:00 | 2024-10-03 18:00:59.371890+00:00 | 62937100 | FEngineLoop::Tick |
59
+ | 1 | 2024-10-03 18:00:58.752476800+00:00 | 2024-10-03 18:00:58.784389+00:00 | 31912200 | FEngineLoop::Tick |
60
+ | 2 | 2024-10-03 18:00:58.701507300+00:00 | 2024-10-03 18:00:58.731479500+00:00 | 29972200 | FEngineLoop::Tick |
61
+ | 3 | 2024-10-03 18:00:59.766343100+00:00 | 2024-10-03 18:00:59.792513700+00:00 | 26170600 | FEngineLoop::Tick |
62
+ | 4 | 2024-10-03 18:00:59.282902100+00:00 | 2024-10-03 18:00:59.308952500+00:00 | 26050400 | FEngineLoop::Tick |
63
+ | 5 | 2024-10-03 18:00:59.816034500+00:00 | 2024-10-03 18:00:59.841376900+00:00 | 25342400 | FEngineLoop::Tick |
64
+ | 6 | 2024-10-03 18:00:58.897813100+00:00 | 2024-10-03 18:00:58.922769700+00:00 | 24956600 | FEngineLoop::Tick |
65
+ | 7 | 2024-10-03 18:00:59.860637+00:00 | 2024-10-03 18:00:59.885523700+00:00 | 24886700 | FEngineLoop::Tick |
66
+ | 8 | 2024-10-03 18:00:58.630051300+00:00 | 2024-10-03 18:00:58.654871500+00:00 | 24820200 | FEngineLoop::Tick |
67
+ | 9 | 2024-10-03 18:00:57.952279800+00:00 | 2024-10-03 18:00:57.977024+00:00 | 24744200 | FEngineLoop::Tick |
68
+
69
+ ## SQL reference
70
+
71
+ The Micromegas analytics service is built on Apache DataFusion, please see [Apache DataFusion SQL Reference](https://datafusion.apache.org/user-guide/sql/index.html) for details.
72
+
73
+ ## View sets
74
+
75
+ All view instances in a set have the same schema. Some view instances are global (their view_instance_id is 'global').
76
+ Global view instances are implicitly accessible to SQL queries. Non-global view instances are accessible using the table function `view_instance`.
77
+
78
+ ### log_entries
79
+
80
+ ```python
81
+ client.query("DESCRIBE log_entries")
82
+ ```
83
+ | | column_name | data_type | is_nullable |
84
+ |---:|:--------------|:--------------------------------------|:--------------|
85
+ | 0 | process_id | Dictionary(Int16, Utf8) | NO |
86
+ | 1 | exe | Dictionary(Int16, Utf8) | NO |
87
+ | 2 | username | Dictionary(Int16, Utf8) | NO |
88
+ | 3 | computer | Dictionary(Int16, Utf8) | NO |
89
+ | 4 | time | Timestamp(Nanosecond, Some("+00:00")) | NO |
90
+ | 5 | target | Dictionary(Int16, Utf8) | NO |
91
+ | 6 | level | Int32 | NO |
92
+ | 7 | msg | Utf8 | NO |
93
+
94
+
95
+ #### log_entries view instances
96
+ The implicit use of the `log_entries` table corresponds to the 'global' instance, which contains the log entries of all the processes.
97
+
98
+ Except the 'global' instance, the instance_id refers to any process_id. `view_instance('log_entries', process_id)` contains that process's log. Process-specific views are materialized just-in-time and can provide much better query performance compared to the global instance.
99
+
100
+ ### measures
101
+
102
+ ```python
103
+ client.query("DESCRIBE measures")
104
+ ```
105
+ | | column_name | data_type | is_nullable |
106
+ |---:|:--------------|:--------------------------------------|:--------------|
107
+ | 0 | process_id | Dictionary(Int16, Utf8) | NO |
108
+ | 1 | exe | Dictionary(Int16, Utf8) | NO |
109
+ | 2 | username | Dictionary(Int16, Utf8) | NO |
110
+ | 3 | computer | Dictionary(Int16, Utf8) | NO |
111
+ | 4 | time | Timestamp(Nanosecond, Some("+00:00")) | NO |
112
+ | 5 | target | Dictionary(Int16, Utf8) | NO |
113
+ | 6 | name | Dictionary(Int16, Utf8) | NO |
114
+ | 7 | unit | Dictionary(Int16, Utf8) | NO |
115
+ | 8 | value | Float64 | NO |
116
+
117
+
118
+ #### measures view instances
119
+
120
+ The implicit use of the `measures` table corresponds to the 'global' instance, which contains the metrics of all the processes.
121
+
122
+ Except the 'global' instance, the instance_id refers to any process_id. `view_instance('measures', process_id)` contains that process's metrics. Process-specific views are materialized just-in-time and can provide much better query performance compared to the 'global' instance.
123
+
124
+ ### thread_spans
125
+
126
+ | | column_name | data_type | is_nullable |
127
+ |---:|:--------------|:--------------------------------------|:--------------|
128
+ | 0 | id | Int64 | NO |
129
+ | 1 | parent | Int64 | NO |
130
+ | 2 | depth | UInt32 | NO |
131
+ | 3 | hash | Uint32 | NO |
132
+ | 4 | begin | Timestamp(Nanosecond, Some("+00:00")) | NO |
133
+ | 5 | end | Timestamp(Nanosecond, Some("+00:00")) | NO |
134
+ | 6 | duration | Int64 | NO |
135
+ | 7 | name | Dictionary(Int16, Utf8) | NO |
136
+ | 8 | target | Dictionary(Int16, Utf8) | NO |
137
+ | 9 | filename | Dictionary(Int16, Utf8) | NO |
138
+ | 10| line | UInt32 | NO |
139
+
140
+ #### thread_spans view instances
141
+
142
+ There is no 'global' instance in the 'thread_spans' view set, there is therefore no implicit thread_spans table availble.
143
+ Users can call the table function `view_instance('thread_spans', stream_id)` to query the spans in the thread associated with the specified stream_id.
144
+
145
+
146
+ ### processes
147
+
148
+ ```python
149
+ client.query("DESCRIBE processes")
150
+ ```
151
+ | | column_name | data_type | is_nullable |
152
+ |---:|:------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------|
153
+ | 0 | process_id | Utf8 | NO |
154
+ | 1 | exe | Utf8 | NO |
155
+ | 2 | username | Utf8 | NO |
156
+ | 3 | realname | Utf8 | NO |
157
+ | 4 | computer | Utf8 | NO |
158
+ | 5 | distro | Utf8 | NO |
159
+ | 6 | cpu_brand | Utf8 | NO |
160
+ | 7 | tsc_frequency | Int64 | NO |
161
+ | 8 | start_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
162
+ | 9 | start_ticks | Int64 | NO |
163
+ | 10 | insert_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
164
+ | 11 | parent_process_id | Utf8 | NO |
165
+ | 12 | properties | List(Field { name: "Property", data_type: Struct([Field { name: "key", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "value", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) | NO |
166
+
167
+
168
+ There is only one instance in this view set and it is implicitly available.
169
+
170
+
171
+ ### streams
172
+
173
+ ```python
174
+ client.query("DESCRIBE streams")
175
+ ```
176
+ | | column_name | data_type | is_nullable |
177
+ |---:|:----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------|
178
+ | 0 | stream_id | Utf8 | NO |
179
+ | 1 | process_id | Utf8 | NO |
180
+ | 2 | dependencies_metadata | Binary | NO |
181
+ | 3 | objects_metadata | Binary | NO |
182
+ | 4 | tags | List(Field { name: "tag", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) | YES |
183
+ | 5 | properties | List(Field { name: "Property", data_type: Struct([Field { name: "key", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "value", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) | NO |
184
+ | 6 | insert_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
185
+
186
+ There is only one instance in this view set and it is implicitly available.
187
+
188
+ ### blocks
189
+
190
+
191
+ ```python
192
+ client.query("DESCRIBE blocks")
193
+ ```
194
+
195
+ | | column_name | data_type | is_nullable |
196
+ |---:|:------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------|
197
+ | 0 | block_id | Utf8 | NO |
198
+ | 1 | stream_id | Utf8 | NO |
199
+ | 2 | process_id | Utf8 | NO |
200
+ | 3 | begin_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
201
+ | 4 | begin_ticks | Int64 | NO |
202
+ | 5 | end_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
203
+ | 6 | end_ticks | Int64 | NO |
204
+ | 7 | nb_objects | Int32 | NO |
205
+ | 8 | object_offset | Int64 | NO |
206
+ | 9 | payload_size | Int64 | NO |
207
+ | 10 | insert_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
208
+ | 11 | streams.dependencies_metadata | Binary | NO |
209
+ | 12 | streams.objects_metadata | Binary | NO |
210
+ | 13 | streams.tags | List(Field { name: "tag", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) | YES |
211
+ | 14 | streams.properties | List(Field { name: "Property", data_type: Struct([Field { name: "key", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "value", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) | NO |
212
+ | 15 | processes.start_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
213
+ | 16 | processes.start_ticks | Int64 | NO |
214
+ | 17 | processes.tsc_frequency | Int64 | NO |
215
+ | 18 | processes.exe | Utf8 | NO |
216
+ | 19 | processes.username | Utf8 | NO |
217
+ | 20 | processes.realname | Utf8 | NO |
218
+ | 21 | processes.computer | Utf8 | NO |
219
+ | 22 | processes.distro | Utf8 | NO |
220
+ | 23 | processes.cpu_brand | Utf8 | NO |
221
+ | 24 | processes.insert_time | Timestamp(Nanosecond, Some("+00:00")) | NO |
222
+ | 25 | processes.parent_process_id | Utf8 | NO |
223
+ | 26 | processes.properties | List(Field { name: "Property", data_type: Struct([Field { name: "key", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "value", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) | NO |
224
+
225
+ There is only one instance in this view set and it is implicitly available.
@@ -22,17 +22,6 @@ class Client:
22
22
  headers=self.headers,
23
23
  )
24
24
 
25
- def query_processes(self, begin, end, limit):
26
- return request.request(
27
- self.analytics_base_url + "query_processes",
28
- {
29
- "begin": time.format_datetime(begin),
30
- "end": time.format_datetime(end),
31
- "limit": limit,
32
- },
33
- headers=self.headers,
34
- )
35
-
36
25
  def query_streams(self, begin, end, limit, process_id=None, tag_filter=None):
37
26
  args = {
38
27
  "begin": time.format_datetime(begin),
@@ -62,72 +51,26 @@ class Client:
62
51
  headers=self.headers,
63
52
  )
64
53
 
65
- def query_spans(self, begin, end, limit, stream_id):
66
- return request.request(
67
- self.analytics_base_url + "query_spans",
68
- {
69
- "begin": time.format_datetime(begin),
70
- "end": time.format_datetime(end),
71
- "limit": limit,
72
- "stream_id": stream_id,
73
- },
74
- headers=self.headers,
75
- )
76
-
77
- def query_thread_events(self, begin, end, limit, stream_id):
78
- return request.request(
79
- self.analytics_base_url + "query_thread_events",
80
- {
81
- "begin": time.format_datetime(begin),
82
- "end": time.format_datetime(end),
83
- "limit": limit,
84
- "stream_id": stream_id,
85
- },
86
- headers=self.headers,
87
- )
88
-
89
- def query_log_entries(
90
- self,
91
- begin,
92
- end,
93
- limit=None, # Necessary if stream_id is specified, ignored otherwise
94
- stream_id=None, # If none, query is run on cached lakehouse using query engine
95
- sql=None, # Necessary if stream_id is None, ignored otherwise
96
- ):
54
+ def query_view(self, view_set_name, view_instance_id, begin, end, sql):
97
55
  return request.request(
98
- self.analytics_base_url + "query_log_entries",
56
+ self.analytics_base_url + "query_view",
99
57
  {
58
+ "view_set_name": view_set_name,
59
+ "view_instance_id": view_instance_id,
100
60
  "begin": time.format_datetime(begin),
101
61
  "end": time.format_datetime(end),
102
- "limit": limit,
103
- "stream_id": stream_id,
104
62
  "sql": sql,
105
63
  },
106
64
  headers=self.headers,
107
65
  )
108
66
 
109
- def query_metrics(self, begin, end, limit=None, stream_id=None, sql=None):
67
+ def query(self, sql, begin=None, end=None):
110
68
  return request.request(
111
- self.analytics_base_url + "query_metrics",
69
+ self.analytics_base_url + "query",
112
70
  {
113
- "begin": time.format_datetime(begin),
114
- "end": time.format_datetime(end),
115
- "limit": limit,
116
- "stream_id": stream_id,
117
71
  "sql": sql,
118
- },
119
- headers=self.headers,
120
- )
121
-
122
- def query_view(self, view_set_name, view_instance_id, begin, end, sql):
123
- return request.request(
124
- self.analytics_base_url + "query_view",
125
- {
126
- "view_set_name": view_set_name,
127
- "view_instance_id": view_instance_id,
128
72
  "begin": time.format_datetime(begin),
129
73
  "end": time.format_datetime(end),
130
- "sql": sql,
131
74
  },
132
75
  headers=self.headers,
133
76
  )