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

saz-tools

v0.0.17

Published

Parsing, dumping, viewing and analysing tools for SAZ (Fiddler) files

Downloads

16

Readme

saz-tools

Build Status Dependency Status devDependency Status Go Report Card GitHub go.mod Go version Documentation Homebrew Snap Scoop GitHub release (latest SemVer including pre-releases) npm Docker Image Version (latest by date)

Tools for parsing SAZ files (Fiddler logs) and either printing their content on the console, or viewing them on a web page and offering basic analysis and export. Try the on-line version of the SAZ Viewer.

Installation

If you have Go installed, using go get to install a global module is the easiest way:

$ GO111MODULE=off go get -u github.com/prantlf/saz-tools/...

If you have Node.js installed, you can use NPM, Yarn or PNPM to install a global module easily:

npm i -g saz-tools
yarn global add saz-tools
pnpm i -g saz-tools

If you have the standard sh available, you can use the installation script from GoBinaries:

curl -sf https://gobinaries.com/prantlf/saz-tools | sh

If you manage your software using Homebrew, you can install the tools using their formula:

brew install prantlf/tap/saz-tools

Windows users can install using the Scoop manifest:

scoop bucket add prantlf https://github.com/prantlf/scoop-bucket.git
scoop install prantlf/saz-tools

Ubuntu users can install the Snap package:

sudo snap install saz-tools

If you work on Linux which uses deb or rpm packages, you can download and install a package from GitHub releases.

Or download and unpack a binary archive for your operation system from GitHub releases directly.

If you want to install a specific commit or the latest master and you do not have the development environment to build it, you can use Docker to build:

git clone https://github.com/prantlf/saz-tools.git
cd saz-tools
docker run --rm -it -v ${PWD}:/work -w /work \
  prantlf/golang-make-nodejs-git clean prepare all DOCKER=1

If you want to run the tools using Docker images, see the instructions below.

Tools

$ sazdump.go -h
Usage: sazdump [options] <file.saz>
Options:
  -version | -v : print the version of this tool and exit

$ sazdump foo.saz
Number Timeline Method Code URL Begin End Duration Size Encoding Cache Process
1 00:00.000 GET 200 https://example.com/foo 16:11:58.755 16:11:59.013 00:00.257 506 gzip max-age=31536000 chromium:18160
2 00:01.573 GET 200 https://example.com/bar 16:11:59.419 16:11:59.873 00:00.454 1,201 raw no-store,no-cache chromium:18160
...

$ sazserve -h
Usage: sazserve [options]
Options:
  -browser       : start the web browser automatically  (default false)
  -port <number> : port for the web server to listen on (default "7000")
  -version | -v  : print the version of this tool and exit

$ sazserve
$ open http://localhost:7000/

API

import (
  "github.com/prantlf/saz-tools/pkg/analyzer"
  "github.com/prantlf/saz-tools/pkg/dumper"
  "github.com/prantlf/saz-tools/pkg/parser"
)

func main() {
  rawSessions, _ := parser.ParseFile("foo.saz")
  fineSessions, _ := analyzer.Analyze(rawSessions)
  dumper.Dump(rawSessions)
}

Build

You need Go, Make, Node.js, NPM and Patch to build all parts of this module from sources.

# Install build tools only once:
make prepare
# Build all targets:
make
# Dump a SAZ file analysis on the console:
make run-dump SAZ="..."
# Start a SAZ file viewer as a browser application with bundled assets:
make run-serve
# Start a SAZ file viewer as a browser application with filesystem assets:
make debug-serve
# Remove all build output:
make clean

Docker

prantlf/sazdump prantlf/sazserve

The sazdump image and the sazserve image allows you to execute the tools described above. They are built automatically on the top of the tag latest from the scratch image.

The following tags are available for the prantlf/sazdump and prantlf/sazserve images:

  • latest

Download the latest image to your disk:

docker pull prantlf/sazdump
docker pull prantlf/sazserve
# or
docker pull prantlf/sazdump:latest
docker pull prantlf/sazserve:latest

Print usage description with command-line parameters:

docker run --rm -it prantlf/sazdump -h

For example, dump the context of the foo.saz file:

docker run --rm -it -v ${PWD}:/work -w /work sazdump foo.saz

Or start the browser application to analyse SAZ files on your machine:

docker run --rm -it -p 7000:7000 sazserve

You can also put sazdump and sazserve scripts to PATH:

#!/bin/sh
docker run --rm -it -v ${PWD}:/work -w /work sazdump "$@"

#!/bin/sh
docker run --rm -it -v -p 7000:7000 sazserve

and execute then from any location by supplying parameters to it, for example:

sazdump foo.saz
sazserve

Local images are built as sazdump and sazserve and they are pushed to the docker hub as prantlf/sazdump:latest and prantlf/sazserve:latest.

# Check the Dockerfiles:
make docker-lint
# Build new local images:
make docker-build
# Print the help for the SAZ file dumper:
make docker-run-help
# Dump a SAZ file analysis on the console:
make docker-dump-example SAZ="..."
# Start a SAZ file viewer as a web application:
make docker-serve-example
# Tag local images for pushing:
make docker-tag
# Login to the docker hub:
make docker-login
# Push local images to the docker hub:
make docker-push

Release

# make all changes, bump the version and tag it
make clean prepare lint all
conventional-changelog -p angular -i CHANGELOG.md -s
# update the tag
snapcraft login --with snap.login
goreleaser release --rm-dist
# pull and update brew, update scoop
# push to heroku

License

Copyright (c) 2020-2021 Ferdinand Prantl

Licensed under the MIT license.