https://github.com/krisleech/wisper-visualize
Visualizations for Wisper events
https://github.com/krisleech/wisper-visualize
Last synced: about 1 year ago
JSON representation
Visualizations for Wisper events
- Host: GitHub
- URL: https://github.com/krisleech/wisper-visualize
- Owner: krisleech
- License: mit
- Created: 2014-10-15T12:54:54.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-03-18T11:49:55.000Z (about 7 years ago)
- Last Synced: 2025-04-13T03:06:56.432Z (about 1 year ago)
- Language: Ruby
- Size: 152 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Wisper::Visualize
Provides a graph of published [Wisper](https://github.com/krisleech/wisper) events as a PNG or PDF

## Installation
```ruby
gem 'wisper-visualize'
```
## Usage
```ruby
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:
```ruby
report.events # => [...]
```
Each event has the following attributes:
```ruby
event.name
event.publisher_name
event.subscriber_name
event.arg_names
event.created_at
event.frequency
```
## Rspec
```ruby
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.