rubyconvict / wisper-visualize

Visualizations for Wisper events

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wisper::Visualize

Provides a graph of published Wisper events as a PNG or PDF

example output

Installation

gem 'wisper-visualize'

Usage

report = Wisper::Visualize.report

# broadcast some events...

report.to_pdf('/tmp/events-graph.pdf')
report.to_png('/tmp/events-graph.png')

You can also get a collection of all events published:

report.events # => [...]

Each event has the following attributes:

event.name
event.publisher_name
event.subscriber_name
event.arg_names
event.created_at
event.frequency

Rspec

around(:each) do |example|
  report = Wisper::Visualize.report
  example.call
  report.to_pdf("/tmp/events-graph-#{example.metadata[:full_description]}.pdf")
end

Contributing

Yes, please.

About

Visualizations for Wisper events

License:MIT License


Languages

Language:Ruby 100.0%