npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

witt

v1.0.6

Published

Whisk Information Timeline Tool

Downloads

7

Readme

Whisk Information Timeline Tool (WITT)

Goal

The goal of Witt is to explore new visualizations and analysis of OpenWhisk's activation logs to support debugging and program understanding.

Demo Video

Scenario: Viewing 200 activations of a chatbot application that was implemented as a sequence. Using the timeline view to understand its composition & find the most time-consuming action. Using the summary view to view all activations of that action, how its output data changed with respect to different output actions, and get the slowest activation of the action. Switching back to the timeline view to locate that activation and view the entire sequence.

https://youtu.be/P3iROXjMKN8

Install

npm install witt -g 

Run

By default, Witt retrieves the most recent 20 activations. Simply run

$ witt

Use limit to specify the number of recent activations retrieved. Max is 2000 (it might take a while if the number is more than 200)

$ witt --limit=100

Use file to read activations from a local file. I'll explain this more later.

$ witt --file=data.json

Use key to provide a OpenWhisk key manually

$ witt --key=XXXXXXXXXXXXX

After getting activations from the OpenWhisk server or the assigned local file, the system will open a web page (Witt web UI) in your browser. If the activations come from the OpenWhisk server, you can refresh the web page to retrieve new activations. To quit Witt, close the web page in your browser, and Ctrl-C to end Witt in the terminal.

Witt Web UI

The Web UI provides 3 views of the activations data: timeline view, list view, and summary view. You can select the view using the buttons at the top. Currently selected view is in green, other buttons in grey.

  1. Timeline View: Timeline view screenshot

    The timeline view has a histogram and a timeline visualization. The histogram shows the distribution of the retrieved activations over time. In the histogram, green bars are successful activations, red bars are failed activations. The bar that contains the activation displayed in the right pane is in yellow. The user can drag a rectangle in the histogram to narrow down the number of activations shown in the timeline below.

    In the timeline visualization, each activation is a bar color-coded to show if its a trigger, rule, sequence or action activation. The length of the bar represents it activation's duration. A sequence bar has a dashed rectangle below it to group all the child actions/sequences it invoked. Hovering/clicking on a timeline bar will show the detail information of the activation in the right pane. In the right pane, the user can choose to view a rendered version of the activation or the raw JSON activation file.

  2. List View: List view screenshot

    The list view shows the activations in a familiar list UI. Most recent activations are on the top of the list. Interacting with the list view is similar to interacting with the timeline view.

  3. Summary View (experimental): Summary view screenshot

    The summary view lets the user select an action and view some summary data generated by aggregating the retrieved activations. I gave a demo of how the summary view might be useful to the user in the demo video. Successful and failed activations are summarized separately, selected using a dropdown menu. The summary view shows average, median, min and max execution time of an action; all the actions that ran before the selected action; all the actions that ran after the selected action; and a summary of the action's return data.

    The return data summary aims to provide an output data schema for an action based on its activations. If a property has the same value in all activation logs, the system shows its actual value. Otherwise, the system shows its type. Properties that did not exist in all activation logs have a percentage number in a grey label to show the probability that the property appeared (properties that existed in all activation logs do not have a percentage number). However/clicking on a value or a type will bring up the activations that generate the it in the right pane. The user view the aggregated schema by the action's previous and next action (using two dropdown menus).

Exporting the selected data

The user can click on the "Export Selected Data" button (a blue button) at the top to export activation logs shown in the histogram to a local JSON file. The file can then be loaded back to Witt using the file attribute from the terminal for viewing. This feature can be useful if you want to share the data with other people to debug or explain your Whisk actions.

Note that the exported file will only include the activations that are shown in the histogram. This is useful if you want to exclude certain activations (and generate a cleaner graph) for sharing. If you want to include all the retrieved activations, remember to click on "Reset selection" to reset the histogram before exporting the file. Also, the exported data are not raw OpenWhisk activation logs. They are data processed by Witt.

Limitations

Currently, Witt cannot establish connections among activations that were dynamically invoked from the code. This is because OpenWhisk does not record the caller/callee information for dynamically-invoked activations in the logs. I'm working on ways to use the developer's log to track the caller/callee and visualize it in Witt.