Skip to content

Commit

Permalink
Merge pull request #186 from albertyw/jazzband
Browse files Browse the repository at this point in the history
Replace django-silk organization with jazzband
  • Loading branch information
avelis authored Jul 4, 2017
2 parents 24c6878 + 19edd67 commit 9a17d6b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 464 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Silk
====

*Silk has now moved to the django-silk organization and is looking for contributors - if you think you can help out, please get in touch!*
*Silk has now moved to the [Jazzband](https://jazzband.co/) organization and is looking for contributors - if you think you can help out, please get in touch!*

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/django-silk/silk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![TravisCI Build](https://img.shields.io/travis/django-silk/silk/master.svg)](https://travis-ci.org/django-silk/silk)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jazzband/silk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![TravisCI Build](https://img.shields.io/travis/jazzband/silk/master.svg)](https://travis-ci.org/jazzband/silk)
[![PyPI Download](https://img.shields.io/pypi/v/django-silk.svg)](https://pypi.python.org/pypi/django-silk)
[![PyPI Python Versions](https://img.shields.io/pypi/pyversions/django-silk.svg)](https://pypi.python.org/pypi/django-silk)
[![Jazzband](https://jazzband.co/static/img/badge.svg)](https://jazzband.co/)

Silk is a live profiling and inspection tool for the Django framework. Silk intercepts and stores HTTP requests and database queries before presenting them in a user interface for further inspection:

<img src="https://raw.githubusercontent.com/django-silk/silk/master/screenshots/1.png" width="720px"/>
<img src="https://raw.githubusercontent.com/jazzband/silk/master/screenshots/1.png" width="720px"/>

## Contents

Expand Down Expand Up @@ -92,7 +92,7 @@ if required. The UI can be reached at `/silk/`

### Alternative Installation

Via [github tags](https://github.com/django-silk/silk/releases):
Via [github tags](https://github.com/jazzband/silk/releases):

```bash
pip install django-silk-<version>.tar.gz
Expand All @@ -102,7 +102,7 @@ You can install from master using the following, but please be aware that the ve
may not be working for all versions specified in [requirements](#requirements)

```bash
pip install -e git+https://github.com/django-silk/silk.git#egg=silk
pip install -e git+https://github.com/jazzband/silk.git#egg=silk
```

## Features
Expand All @@ -119,7 +119,7 @@ Silk primarily consists of:
The Silk middleware intercepts and stores requests and responses and stores them in the configured database.
These requests can then be filtered and inspecting using Silk's UI through the request overview:

<img src="https://raw.githubusercontent.com/django-silk/silk/master/screenshots/1.png" width="720px"/>
<img src="https://raw.githubusercontent.com/jazzband/silk/master/screenshots/1.png" width="720px"/>

It records things like:

Expand All @@ -133,18 +133,18 @@ and so on.

Further details on each request are also available by clicking the relevant request:

<img src="https://raw.githubusercontent.com/django-silk/silk/master/screenshots/2.png" width="720px"/>
<img src="https://raw.githubusercontent.com/jazzband/silk/master/screenshots/2.png" width="720px"/>

### SQL Inspection

Silk also intercepts SQL queries that are generated by each request. We can get a summary on things like
the tables involved, number of joins and execution time:

<img src="https://raw.githubusercontent.com/django-silk/silk/master/screenshots/3.png" width="720px"/>
<img src="https://raw.githubusercontent.com/jazzband/silk/master/screenshots/3.png" width="720px"/>

Before diving into the stack trace to figure out where this request is coming from:

<img src="https://raw.githubusercontent.com/django-silk/silk/master/screenshots/5.png" width="720px"/>
<img src="https://raw.githubusercontent.com/jazzband/silk/master/screenshots/5.png" width="720px"/>

### Profiling

Expand Down Expand Up @@ -186,11 +186,11 @@ def post(request, post_id):

Whenever a blog post is viewed we get an entry within the Silk UI:

<img src="https://raw.githubusercontent.com/django-silk/silk/master/screenshots/7.png" width="720px"/>
<img src="https://raw.githubusercontent.com/jazzband/silk/master/screenshots/7.png" width="720px"/>

Silk profiling not only provides execution time, but also collects SQL queries executed within the block in the same fashion as with requests:

<img src="https://raw.githubusercontent.com/django-silk/silk/master/screenshots/8.png" width="720px"/>
<img src="https://raw.githubusercontent.com/jazzband/silk/master/screenshots/8.png" width="720px"/>

#### Decorator

Expand Down Expand Up @@ -338,7 +338,7 @@ it has already been imported, no profiling would be triggered.

Silk currently generates two bits of code per request:

<img src="https://raw.githubusercontent.com/django-silk/silk/master/screenshots/9.png" width="720px"/>
<img src="https://raw.githubusercontent.com/jazzband/silk/master/screenshots/9.png" width="720px"/>

Both are intended for use in replaying the request. The curl command can be used to replay via command-line and the python code can be used within a Django unit test or simply as a standalone script.

Expand Down Expand Up @@ -394,7 +394,7 @@ SILKY_META = True
Silk will then record how long it takes to save everything down to the database at the end of each
request:

<img src="https://raw.githubusercontent.com/django-silk/silk/master/screenshots/meta.png"/>
<img src="https://raw.githubusercontent.com/jazzband/silk/master/screenshots/meta.png"/>

Note that in the above screenshot, this means that the request took 29ms (22ms from Django and 7ms from Silk)

Expand Down
Loading

0 comments on commit 9a17d6b

Please sign in to comment.