Commit 3e51a26a authored by Brice Videau's avatar Brice Videau
Browse files

Added simple ze trace viewer.

parent f805b2e6
#!/usr/bin/env ruby
require 'babeltrace'
require 'babeltrace/ctf'
require 'yaml'
require 'pp'
c = Babeltrace::Context::new
traces = c.add_traces(path: ARGV[0])
puts "#{c.get_timestamp_begin.strftime("%Y-%m-%d %H:%M:%S.%9L %z")} -- #{c.get_timestamp_end.strftime("%Y-%m-%d %H:%M:%S.%9L %z")}"
it = c.iter_create
it.each { |ev|
print "#{ev.timestamp.strftime("%H:%M:%S.%9L")} - #{}: "
defi = ev.top_level_scope(:EVENT_FIELDS)
puts defi.value
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment