Code Monkey home page Code Monkey logo

aws-stats's Introduction

aws-stats

A very simple program for analyzing the S3 log format. It's very, very alpha, but you're welcome to use the code as you like.

Usage

lein run /path/to/dir/with/log/files

Which produces a report that looks like this:

                                   object   requests equivalent downloads
                      004-aaron-bedra.jpg       5176  5140.9355
                005-michael-parenteau.jpg       5005   4990.602
              REL_logo_square_300x300.jpg       1104  523.02856
  ThinkRelevance-003-brenton-ashworth.mp3       1095  531.31335
       ThinkRelevance-004-aaron-bedra.mp3        564  356.94485
 ThinkRelevance-005-michael-parenteau.mp3        520   326.5346
      ThinkRelevance-002-david-liebke.mp3        346  223.93367
    ThinkRelevance-001-JustinGehtland.mp3        278  180.68216

Requests is the raw number of requests for the object that got a 200 back. `Equivalent downloads1 is the number of bytes transferred divided by the object size. So two half-downloads count as a whole one. I wanted that figure because it's possible to get multiple hits for a single .mp3 if people are downloading in chunks. Not perfect, but the best I could do quickly.

I use s3cmd to sync the log files to a local directory.

License

Copyright (C) 2012 Craig Andera

Distributed under the Eclipse Public License, the same as Clojure.

aws-stats's People

Contributors

candera avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aws-stats's Issues

Prefix is not implemented as folders

Right now, prefix is treated literally as a key prefix: objects that simply start with the prefix are included. That is, object /foo/bar/blah.txt is considered to be in prefix /foo. But what we probably want is to treat prefixes more like folders, maybe with a recursive option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.