Calculating Transactions Per Minute from log file entries

Here’s a linux command I found useful in extracting simple transactions per minute from log file entries

grep -h 'Unique text per transaction' requests.log.* | cut -c1-16 | uniq -c | sed s/./,/8 > transactions_per_minute.csv

This produces a file with the number of transactions/requests for each minute over time: e.g.

34,2017-03-29 11:45
83,2017-03-29 11:46
114,2017-03-29 11:47
84,2017-03-29 11:48
70,2017-03-29 11:49
64,2017-03-29 11:50
76,2017-03-29 11:51

You can now convert this into a visually revealing graph, using for example Google Sheets e.g.

Install Docker on Linux Mint 18

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates -y
sudo apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo echo deb ubuntu-xenial main | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-get install linux-image-extra-$(uname -r) -y
sudo apt-get install docker-engine cgroup-lite apparmor -y
sudo usermod -a -G docker $USER
sudo service docker start

Keyboard shortcuts for any web page

Vimium gives you a way to navigate a web page without using the mouse.

I now use this browser extension all the time, in fact I feel lost when using someone else’s computer and have to resort to reaching for the mouse.

It simply gives each hyper link a unique character code e.g. ‘gw’ which you type to select the link. To trigger the codes simply press ‘f’ on a web page.

Vimium is free and open source, and supports Chrome and Firefox.


Do you have any keyboard shortcut productivity tricks? Let me know.

Text to UML

The problem with using drawing tools to produce your UML diagrams is that it makes it hard for someone else to maintain. How many times have you come across a document/wiki you need to update and just have a .PNG file for the sequence diagram, to make changes you now have to redraw the diagram from scratch! Rats!

Text to UML solves this problem by giving you the source code for a diagram. Now all you have to do is edit the source code and re-render and voila, your existing sequence diagram is up to date, lovely.

Other advantages are:

  • It’s much quicker to make changes
  • You don’t have to worry about consistent layout
  • Diagrams can be generated

The best tool I’ve found so far is PlantUml it supports most UML diagram types. PlantUml is open source available on SourceForge

Martin Fowler also seems to prefer a text to UML approach