diff options
Diffstat (limited to 'src')
34 files changed, 2902 insertions, 0 deletions
diff --git a/src/blog/golang-profiling-simplified.md b/src/blog/golang-profiling-simplified.md new file mode 100644 index 0000000..a49de67 --- /dev/null +++ b/src/blog/golang-profiling-simplified.md | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | title: Golang profiling simplified | ||
| 2 | date: 2017-03-07 | ||
| 3 | tags: blog | ||
| 4 | hide: false | ||
| 5 | ---- | ||
| 6 | |||
| 7 | Many posts have been written regarding profiling in Golang and I haven’t found proper tutorial regarding this. Almost all of them are missing some part of important information and it gets pretty frustrating when you have a deadline and are not finding simple distilled solution. | ||
| 8 | |||
| 9 | Nevertheless, after searching and experimenting I have found a solution that works for me and probably should also for you. | ||
| 10 | |||
| 11 | ## Where are my pprof files? | ||
| 12 | |||
| 13 | By default pprof files are generated in /tmp/ folder. You can override folder where this files are generated programmatically in your golang code as we will see below in example. | ||
| 14 | |||
| 15 | ## Why is my CPU profile empty? | ||
| 16 | |||
| 17 | I have found out that sometimes CPU profile is empty because program was not executing long enough. Programs, that execute too quickly don’t produce pprof file in my cases. Well, file is generated but only contains 4KB of information. | ||
| 18 | |||
| 19 | ## Profiling | ||
| 20 | |||
| 21 | As you can see from examples we are executing dummy_benchmark functions to ensure some sort of execution. Memory profiling can be done without such a “complex” function. But CPU profiling needs it. | ||
| 22 | |||
| 23 | Both memory and CPU profiling examples are almost the same. Only parameters in main function when calling profile.Start are different. When we set profile.ProfilePath(“.”) we tell profiler to store pprof files in the same folder as our program. | ||
| 24 | |||
| 25 | ### Memory profiling | ||
| 26 | |||
| 27 | ```go | ||
| 28 | package main | ||
| 29 | |||
| 30 | import ( | ||
| 31 | "fmt" | ||
| 32 | "time" | ||
| 33 | "github.com/pkg/profile" | ||
| 34 | ) | ||
| 35 | |||
| 36 | func dummy_benchmark() { | ||
| 37 | |||
| 38 | fmt.Println("first set ...") | ||
| 39 | for i := 0; i < 918231333; i++ { | ||
| 40 | i *= 2 | ||
| 41 | i /= 2 | ||
| 42 | } | ||
| 43 | |||
| 44 | <-time.After(time.Second*3) | ||
| 45 | |||
| 46 | fmt.Println("sencond set ...") | ||
| 47 | for i := 0; i < 9182312232; i++ { | ||
| 48 | i *= 2 | ||
| 49 | i /= 2 | ||
| 50 | } | ||
| 51 | } | ||
| 52 | |||
| 53 | func main() { | ||
| 54 | defer profile.Start(profile.MemProfile, profile.ProfilePath("."), profile.NoShutdownHook).Stop() | ||
| 55 | dummy_benchmark() | ||
| 56 | } | ||
| 57 | ``` | ||
| 58 | |||
| 59 | ### CPU profiling | ||
| 60 | |||
| 61 | ```go | ||
| 62 | package main | ||
| 63 | |||
| 64 | import ( | ||
| 65 | "fmt" | ||
| 66 | "time" | ||
| 67 | "github.com/pkg/profile" | ||
| 68 | ) | ||
| 69 | |||
| 70 | func dummy_benchmark() { | ||
| 71 | |||
| 72 | fmt.Println("first set ...") | ||
| 73 | for i := 0; i < 918231333; i++ { | ||
| 74 | i *= 2 | ||
| 75 | i /= 2 | ||
| 76 | } | ||
| 77 | |||
| 78 | <-time.After(time.Second*3) | ||
| 79 | |||
| 80 | fmt.Println("sencond set ...") | ||
| 81 | for i := 0; i < 9182312232; i++ { | ||
| 82 | i *= 2 | ||
| 83 | i /= 2 | ||
| 84 | } | ||
| 85 | } | ||
| 86 | |||
| 87 | func main() { | ||
| 88 | defer profile.Start(profile.CPUProfile, profile.ProfilePath("."), profile.NoShutdownHook).Stop() | ||
| 89 | dummy_benchmark() | ||
| 90 | } | ||
| 91 | ``` | ||
| 92 | |||
| 93 | ### Generating profiling reports | ||
| 94 | |||
| 95 | ```bash | ||
| 96 | # memory profiling | ||
| 97 | go build mem.go | ||
| 98 | ./mem | ||
| 99 | go tool pprof -pdf ./mem mem.pprof > mem.pdf | ||
| 100 | |||
| 101 | # cpu profiling | ||
| 102 | go build cpu.go | ||
| 103 | ./cpu | ||
| 104 | go tool pprof -pdf ./cpu cpu.pprof > cpu.pdf | ||
| 105 | ``` | ||
| 106 | |||
| 107 | This will generate PDF document with visualized profile. | ||
| 108 | |||
| 109 | - [Memory PDF profile example](/files/go-profiling/golang-profiling-mem.pdf) | ||
| 110 | - [CPU PDF profile example](/files/go-profiling/golang-profiling-cpu.pdf) | ||
diff --git a/src/blog/profiling-python-web-applications-with-visual-tools.md b/src/blog/profiling-python-web-applications-with-visual-tools.md new file mode 100644 index 0000000..e99b9ff --- /dev/null +++ b/src/blog/profiling-python-web-applications-with-visual-tools.md | |||
| @@ -0,0 +1,184 @@ | |||
| 1 | title: Profiling Python web applications with visual tools | ||
| 2 | date: 2017-04-21 | ||
| 3 | tags: blog | ||
| 4 | hide: false | ||
| 5 | ---- | ||
| 6 | |||
| 7 | I have been profiling my software with KCachegrind for a long time now and I was missing this option when I am developing API's or other web services. I always knew that this is possible but never really took the time and dive into it. | ||
| 8 | |||
| 9 | Before we begin there are some requirements. We will need to: | ||
| 10 | |||
| 11 | - implement [cProfile](https://docs.python.org/2/library/profile.html#module-cProfile) into our web app, | ||
| 12 | - convert output to [callgrind](http://valgrind.org/docs/manual/cl-manual.html) format with [pyprof2calltree](https://pypi.python.org/pypi/pyprof2calltree/), | ||
| 13 | - visualize data with [KCachegrind](http://kcachegrind.sourceforge.net/html/Home.html) or [Profiling Viewer](http://www.profilingviewer.com/). | ||
| 14 | |||
| 15 | |||
| 16 | If you are using MacOS you should check out [Profiling Viewer](http://www.profilingviewer.com/) or [MacCallGrind](http://www.maccallgrind.com/). | ||
| 17 | |||
| 18 |  | ||
| 19 | |||
| 20 | We will be dividing this post into two main categories: | ||
| 21 | |||
| 22 | - writing simple web-service, | ||
| 23 | - visualize profile of this web-service. | ||
| 24 | |||
| 25 | ## Simple web-service | ||
| 26 | |||
| 27 | Let's use virtualenv so we won't pollute our base system. If you don't have virtualenv installed on your system you can install it with pip command. | ||
| 28 | |||
| 29 | ```bash | ||
| 30 | # let's install virtualenv globally | ||
| 31 | $ sudo pip install virtualenv | ||
| 32 | |||
| 33 | # let's also install pyprof2calltree globally | ||
| 34 | $ sudo pip install pyprof2calltree | ||
| 35 | |||
| 36 | # now we create project | ||
| 37 | $ mkdir demo-project | ||
| 38 | $ cd demo-project/ | ||
| 39 | |||
| 40 | # now let's create folder where we will store profiles | ||
| 41 | $ mkdir prof | ||
| 42 | |||
| 43 | # now we create empty virtualenv in venv/ folder | ||
| 44 | $ virtualenv --no-site-packages venv | ||
| 45 | |||
| 46 | # we now need to activate virtualenv | ||
| 47 | $ source venv/bin/activate | ||
| 48 | |||
| 49 | # you can check if virtualenv was correctly initialized by | ||
| 50 | # checking where your python interpreter is located | ||
| 51 | # if command bellow points to your created directory and not some | ||
| 52 | # system dir like /usr/bin/python then everything is fine | ||
| 53 | $ which python | ||
| 54 | |||
| 55 | # we can check now if all is good ➜ if ok couple of | ||
| 56 | # lines will be displayed | ||
| 57 | $ pip freeze | ||
| 58 | # appdirs==1.4.3 | ||
| 59 | # packaging==16.8 | ||
| 60 | # pyparsing==2.2.0 | ||
| 61 | # six==1.10.0 | ||
| 62 | |||
| 63 | # now we are ready to install bottlepy ➜ web micro-framework | ||
| 64 | $ pip install bottle | ||
| 65 | |||
| 66 | # you can deactivate virtualenv but you will then go | ||
| 67 | # under system domain ➜ for now don't deactivate | ||
| 68 | $ deactivate | ||
| 69 | ``` | ||
| 70 | |||
| 71 | We are now ready to write simple web service. Let's create file app.py and paste code bellow in this newly created file. | ||
| 72 | |||
| 73 | ```python | ||
| 74 | # -*- coding: utf-8 -*- | ||
| 75 | |||
| 76 | import bottle | ||
| 77 | import random | ||
| 78 | import cProfile | ||
| 79 | |||
| 80 | app = bottle.Bottle() | ||
| 81 | |||
| 82 | # this function is a decorator and encapsulates function | ||
| 83 | # and performs profiling and then saves it to subfolder | ||
| 84 | # prof/function-name.prof | ||
| 85 | # in our example only awesome_random_number function will | ||
| 86 | # be profiled because it has do_cprofile defined | ||
| 87 | def do_cprofile(func): | ||
| 88 | def profiled_func(*args, **kwargs): | ||
| 89 | profile = cProfile.Profile() | ||
| 90 | try: | ||
| 91 | profile.enable() | ||
| 92 | result = func(*args, **kwargs) | ||
| 93 | profile.disable() | ||
| 94 | return result | ||
| 95 | finally: | ||
| 96 | profile.dump_stats("prof/" + str(func.__name__) + ".prof") | ||
| 97 | return profiled_func | ||
| 98 | |||
| 99 | |||
| 100 | # we use profiling over specific function with including | ||
| 101 | # @do_cprofile above function declaration | ||
| 102 | @app.route("/") | ||
| 103 | @do_cprofile | ||
| 104 | def awesome_random_number(): | ||
| 105 | awesome_random_number = random.randint(0, 100) | ||
| 106 | return "awesome random number is " + str(awesome_random_number) | ||
| 107 | |||
| 108 | @app.route("/test") | ||
| 109 | def test(): | ||
| 110 | return "dummy test" | ||
| 111 | |||
| 112 | if __name__ == '__main__': | ||
| 113 | bottle.run( | ||
| 114 | app = app, | ||
| 115 | host = "0.0.0.0", | ||
| 116 | port = 4000 | ||
| 117 | ) | ||
| 118 | |||
| 119 | # run with 'python app.py' | ||
| 120 | # open browser 'http://0.0.0.0:4000' | ||
| 121 | ``` | ||
| 122 | |||
| 123 | When browser hits awesome\_random\_number() function profile is created in prof/ subfolder. | ||
| 124 | |||
| 125 | ## Visualize profile | ||
| 126 | |||
| 127 | Now let's create callgrind format from this cProfile output. | ||
| 128 | |||
| 129 | ```bash | ||
| 130 | $ cd prof/ | ||
| 131 | $ pyprof2calltree -i awesome_random_number.prof | ||
| 132 | # this creates 'awesome_random_number.prof.log' file in the same folder | ||
| 133 | ``` | ||
| 134 | |||
| 135 | This file can be opened with visualizing tools listed above. In this case we will be using Profilling Viewer under MacOS. You can open image in new tab. As you can see from this example there is hierarchy of execution order of your code. | ||
| 136 | |||
| 137 |  | ||
| 138 | |||
| 139 | > Make sure you convert output of the cProfile output every time you want to refresh and take a look at your possible optimizations because cProfile updates .prof file every time browser hits the function. | ||
| 140 | |||
| 141 | This is just a simple example but when you are developing real-life applications this can be very illuminating, especially to see which parts of your code are bottlenecks and need to be optimized. | ||
| 142 | |||
| 143 | ## Update 2017-04-22 | ||
| 144 | |||
| 145 | Reddit user [mvt](https://www.reddit.com/user/mvt) also recommended this awesome web based profile visualizer [SnakeViz](https://jiffyclub.github.io/snakeviz/) that directly takes output from [cProfile](https://docs.python.org/2/library/profile.html#module-cProfile) module. | ||
| 146 | |||
| 147 | <div class="reddit-embed" data-embed-media="www.redditmedia.com" data-embed-parent="false" data-embed-live="false" data-embed-uuid="583880c1-002e-41ed-a373-020a0ef2cff9" data-embed-created="2017-04-22T19:46:54.810Z"><a href="https://www.reddit.com/r/Python/comments/66v373/profiling_python_web_applications_with_visual/dgljhsb/">Comment</a> from discussion <a href="https://www.reddit.com/r/Python/comments/66v373/profiling_python_web_applications_with_visual/">Profiling Python web applications with visual tools</a>.</div><script async src="https://www.redditstatic.com/comment-embed.js"></script> | ||
| 148 | |||
| 149 | ```bash | ||
| 150 | # let's install it globally as well | ||
| 151 | $ sudo pip install snakeviz | ||
| 152 | |||
| 153 | # now let's visualize | ||
| 154 | $ cd prof/ | ||
| 155 | $ snakeviz awesome_random_number.prof | ||
| 156 | # this automatically opens browser window and | ||
| 157 | # shows visualized profile | ||
| 158 | ``` | ||
| 159 | |||
| 160 |  | ||
| 161 | |||
| 162 | Reddit user [ccharles](https://www.reddit.com/user/ccharles) suggested a better way for installing pip software by targeting user level instead of using sudo. | ||
| 163 | |||
| 164 | <div class="reddit-embed" data-embed-media="www.redditmedia.com" data-embed-parent="false" data-embed-live="false" data-embed-uuid="f4f0459e-684d-441e-bebe-eb49b2f0a31d" data-embed-created="2017-04-22T19:46:10.874Z"><a href="https://www.reddit.com/r/Python/comments/66v373/profiling_python_web_applications_with_visual/dglpzkx/">Comment</a> from discussion <a href="https://www.reddit.com/r/Python/comments/66v373/profiling_python_web_applications_with_visual/">Profiling Python web applications with visual tools</a>.</div><script async src="https://www.redditstatic.com/comment-embed.js"></script> | ||
| 165 | |||
| 166 | ```bash | ||
| 167 | # now we need to add this path to our $PATH variable | ||
| 168 | # we do this my adding this line at the end of your | ||
| 169 | # ~/.bashrc file | ||
| 170 | PATH=$PATH:$HOME/.local/bin/ | ||
| 171 | |||
| 172 | # in order to use this new configuration you can close | ||
| 173 | # and reopen terminal or reload .bashrc file | ||
| 174 | $ source ~/.bashrc | ||
| 175 | |||
| 176 | # now let's test if new directory is present in $PATH | ||
| 177 | $ echo $PATH | ||
| 178 | |||
| 179 | # now we can install on user level by adding --user | ||
| 180 | # without use of sudo | ||
| 181 | $ pip install snakeviz --user | ||
| 182 | ``` | ||
| 183 | |||
| 184 | Or as suggested by [mvt](https://www.reddit.com/user/mvt) you can use [pipsi](https://github.com/mitsuhiko/pipsi). | ||
diff --git a/src/blog/simple-iot-application.md b/src/blog/simple-iot-application.md new file mode 100644 index 0000000..2b7d67f --- /dev/null +++ b/src/blog/simple-iot-application.md | |||
| @@ -0,0 +1,486 @@ | |||
| 1 | title: Simple IOT application supported by real-time monitoring and data history | ||
| 2 | date: 2017-08-11 | ||
| 3 | tags: blog | ||
| 4 | hide: false | ||
| 5 | ---- | ||
| 6 | |||
| 7 | ## Initial thoughts | ||
| 8 | |||
| 9 | I have been developing these kind of application for the better part of my last 5 years and people keep asking me how to approach developing such application and I will give a try explaining it here. | ||
| 10 | |||
| 11 | IOT applications are really no different than any other kind of applications. We have data that needs to be collected and visualized in some form of tables or charts. The main difference here is that most of the times these data is collected by some kind of device foreign to developer that mainly operates in web domain. But fear not, it's not that different than writing some JavaScript. | ||
| 12 | |||
| 13 | There are many devices able to transmit data via wireless or wired network by default but for the sake of example we will be using commonly known Arduino with wireless module already on the board → [Arduino MKR1000](https://store.arduino.cc/arduino-mkr1000). | ||
| 14 | |||
| 15 | In order to make this little project as accessible to others as possible I will try to make it as inexpensive as possible. And by this I mean that I will avoid using hosted virtual servers and will be using my own laptop as a server. But you must buy Arduino MKR1000 to follow steps below. But if you would want to deploy this software I would suggest using [DigitalOcean](https://www.digitalocean.com) → smallest VPS is only per month making this one of the most affordable option out there. Please notice that this software will not run on stock web hosting that only supports LAMP (Linux, Apache, MySQL, and PHP). | ||
| 16 | |||
| 17 | _But before we begin please take notice that this is strictly experimental code and not well optimized and there are much better ways in handling some aspects of the application but that requires much deeper knowledge of technology that is not needed for an example like this._ | ||
| 18 | |||
| 19 | **Development steps** | ||
| 20 | |||
| 21 | 1. Simple Python API that will receive and store incoming data. | ||
| 22 | 2. Prototype C++ code that will read "sensor data" and transmit it to API. | ||
| 23 | 3. Data visualization with charts → extends Python web application. | ||
| 24 | |||
| 25 | Step 1. and 3. will share the same web application. One route will be dedicated to API and another to serving HTML with chart. | ||
| 26 | |||
| 27 | Schema below represents what we will try to achieve and how different parts correlates to each other. | ||
| 28 | |||
| 29 |  | ||
| 30 | |||
| 31 | ## Simple Python API | ||
| 32 | |||
| 33 | I have always been a fan of simplicity so we will be using [Bottle: Python Web Framework](https://bottlepy.org/docs/dev/). It is a single file web framework that seriously simplifies working with routes, templating and has built-in web server that satisfies our need in this case. | ||
| 34 | |||
| 35 | First we need to install bottle package. This can be done by downloading ```bottle.py``` and placing it in the root of your application or by using pip software ```pip install bottle --user```. | ||
| 36 | |||
| 37 | If you are using Linux or MacOS then Python is already installed. If you will try to test this on Windows please install [Python for Windows](https://www.python.org/downloads/windows/). There may be some problems with path when you will try to launch ```python webapp.py``` so please take care of this before you continue. | ||
| 38 | |||
| 39 | ### Basic web application | ||
| 40 | |||
| 41 | Most basic bottle application is quite simple. Paste code below in ```webapp.py``` file and save. | ||
| 42 | |||
| 43 | ```python | ||
| 44 | # -*- coding: utf-8 -*- | ||
| 45 | |||
| 46 | import bottle | ||
| 47 | |||
| 48 | # initializing bottle app | ||
| 49 | app = bottle.Bottle() | ||
| 50 | |||
| 51 | # triggered when / is accessed from browser | ||
| 52 | # only accepts GET → no POST allowed | ||
| 53 | @app.route("/", method=["GET"]) | ||
| 54 | def route_default(): | ||
| 55 | return "howdy from python" | ||
| 56 | |||
| 57 | # starting server on http://0.0.0.0:5000 | ||
| 58 | if __name__ == "__main__": | ||
| 59 | bottle.run( | ||
| 60 | app = app, | ||
| 61 | host = "0.0.0.0", | ||
| 62 | port = 5000, | ||
| 63 | debug = True, | ||
| 64 | reloader = True, | ||
| 65 | catchall = True, | ||
| 66 | ) | ||
| 67 | ``` | ||
| 68 | |||
| 69 | To run this simple application you should open command prompt or terminal on your machine and go to the folder containing your file and type ```python webapp.py```. If everything goes ok then open your web browser and point it to ```http://0.0.0.0:5000```. | ||
| 70 | |||
| 71 | If you would like change the port of your application (like port 80) and not use root to run your app this will present a problem. The TCP/IP port numbers below 1024 are privileged ports → this is a security feature. So in order of simplicity and security use a port number above 1024 like I have used port 5000. | ||
| 72 | |||
| 73 | If this fails at any time please fix it before you continue, because nothing below will work otherwise. | ||
| 74 | |||
| 75 | We use 0.0.0.0 as default host so that this app is available over your local network. If you find your local ip ```ifconfig``` and try accessing this site with your phone (if on same network/router as your machine) this should work as well (example of such ip ```http://192.168.1.15:5000```). This is a must have because Arduino will be accessing this application to send it's data. | ||
| 76 | |||
| 77 | ### Web application security | ||
| 78 | |||
| 79 | There is a lot to be said about security and is a topic of many books. Of course all this can not be written here but to just establish some basic security → you should always use SSL with your application. Some fantastic free certificates are available by [Let's Encrypt - Free SSL/TLS Certificates](https://letsencrypt.org). With SSL certificate installed you should then make use of HTTP headers and send your "API key" via a header. If your key is send via header then this key is encrypted by SSL and send encrypted over the network. Never send your api keys by GET parameter like ```http://example.com/?api_key=somekeyvalue```. The problem that this kind of sending presents is that this key is visible in logs and by network sniffers. | ||
| 80 | |||
| 81 | There is a fantastic article describing some aspects about security: [11 Web Application Security Best Practices](https://www.keycdn.com/blog/web-application-security-best-practices/). Please check it out. | ||
| 82 | |||
| 83 | ### Simple API for writing data-points | ||
| 84 | |||
| 85 | We will now be using boilerplate code from example above and extend it to be able to write data received by API to local storage. For example use I will use SQLite3 because it plays well with Python and can store quite large amount of data. I have been using it to collect gigabytes of data in a single database without any corruption or problems → your experience may vary. | ||
| 86 | |||
| 87 | To avoid learning SQLite I will be using [Dataset: databases for lazy people](https://dataset.readthedocs.io/en/latest/index.html). This package abstracts SQL and simplifies writing and reading data from database. You should install this package with pip software ```pip install dataset --user```. | ||
| 88 | |||
| 89 | Because API will use POST method I will be testing if code works correctly by using [Restlet Client for Google Chrome](https://chrome.google.com/webstore/detail/restlet-client-rest-api-t/aejoelaoggembcahagimdiliamlcdmfm). This software also allows you to set headers → for basic security with API_KEY. | ||
| 90 | |||
| 91 | To quickly generate passwords or API keys I usually use this nifty website [RandomKeygen](https://randomkeygen.com/). | ||
| 92 | |||
| 93 | Copy and paste code below over your previous code in file ```webapp.py```. | ||
| 94 | |||
| 95 | ```python | ||
| 96 | # -*- coding: utf-8 -*- | ||
| 97 | |||
| 98 | import time | ||
| 99 | import bottle | ||
| 100 | import random | ||
| 101 | import dataset | ||
| 102 | |||
| 103 | # initializing bottle app | ||
| 104 | app = bottle.Bottle() | ||
| 105 | |||
| 106 | # connects to sqlite database | ||
| 107 | # check_same_thread=False allows using it in multi-threaded mode | ||
| 108 | app.config["dsn"] = dataset.connect("sqlite:///data.db?check_same_thread=False") | ||
| 109 | |||
| 110 | # api key that will be used in Arduino code | ||
| 111 | app.config["api_key"] = "JtF2aUE5SGHfVJBCG5SH" | ||
| 112 | |||
| 113 | # triggered when /api is accessed from browser | ||
| 114 | # only accepts POST → no GET allowed | ||
| 115 | @app.route("/api", method=["POST"]) | ||
| 116 | def route_default(): | ||
| 117 | status = 400 | ||
| 118 | ts = int(time.time()) # current timestamp | ||
| 119 | value = bottle.request.body.read() # data from device | ||
| 120 | api_key = bottle.request.get_header("Api_Key") # api key from header | ||
| 121 | |||
| 122 | # outputs to console received data for debug reason | ||
| 123 | print ">>> {} :: {}".format(value, api_key) | ||
| 124 | |||
| 125 | # if api_key is correct and value is present | ||
| 126 | # then writes attribute to point table | ||
| 127 | if api_key == app.config["api_key"] and value: | ||
| 128 | app.config["dsn"]["point"].insert(dict(ts=ts, value=value)) | ||
| 129 | status = 200 | ||
| 130 | |||
| 131 | # we only need to return status | ||
| 132 | return bottle.HTTPResponse(status=status, body="") | ||
| 133 | |||
| 134 | # starting server on http://0.0.0.0:5000 | ||
| 135 | if __name__ == "__main__": | ||
| 136 | bottle.run( | ||
| 137 | app = app, | ||
| 138 | host = "0.0.0.0", | ||
| 139 | port = 5000, | ||
| 140 | debug = True, | ||
| 141 | reloader = True, | ||
| 142 | catchall = True, | ||
| 143 | ) | ||
| 144 | ``` | ||
| 145 | |||
| 146 | To run this simply go to folder containing python file and run ```python webapp.py``` from terminal. If everything goes ok you should have simple API available via POST method on /api route. | ||
| 147 | |||
| 148 | After testing the service with Restlet Client you should be able to view your data in a database file ```data.db```. | ||
| 149 | |||
| 150 |  | ||
| 151 | |||
| 152 | You can also check the contents of new database file by using desktop client for SQLite → [DB Browser for SQLite](http://sqlitebrowser.org/). | ||
| 153 | |||
| 154 |  | ||
| 155 | |||
| 156 | Table structure is as simple as it can be. We have ts (timestamp) and value (value from Arduino). As you can see timestamp is generated on API side. If you would happen to have atomic clock on Arduino it would be then better to generate and send timestamp with the value. This would be particularity useful if we would be collecting sensor data at a higher frequency and then sending this data in bulk to API. | ||
| 157 | |||
| 158 | If you will deploy this app with uWSGI and multi-threaded, use DSN (Data Source Name) url with ```?check_same_thread=False```. | ||
| 159 | |||
| 160 | Ok, now that we have some sort of a working API with some basic security so unwanted people can not post data to your database can we proceed further and try to program Arduino to send data to API. | ||
| 161 | |||
| 162 | ## Sending data to API with Arduino MKR1000 | ||
| 163 | |||
| 164 | First of all you should have MKR1000 module and microUSB cable to proceed. If you have ever done any work with Arduino you should know that you also need [Arduino IDE](https://www.arduino.cc/en/Main/Software). On provided link you should be able to download and install IDE. Once that task is completed and you have successfully run blink example you should proceed to the next step. | ||
| 165 | |||
| 166 | In order to use wireless capabilities of MKR1000 you need to first install [WiFi101 library](https://www.arduino.cc/en/Reference/WiFi101) in Arduino IDE. Please check before you install, you may already have it installed. | ||
| 167 | |||
| 168 | Code below is a working example that sends data to API. Before you try to test your code make sure you have run Python web application. Then change settings for wifi, api endpoint and api_key. If by some reason code bellow doesn't work for you please leave a comment and I'll try to help. | ||
| 169 | |||
| 170 | Once you have opened IDE and copied this code try to compile and upload it. Then open "Serial monitor" to see if any output is presented by Arduino. | ||
| 171 | |||
| 172 | ```c | ||
| 173 | #include <WiFi101.h> | ||
| 174 | |||
| 175 | // wifi settings | ||
| 176 | char ssid[] = "ssid-name"; | ||
| 177 | char pass[] = "ssid-password"; | ||
| 178 | |||
| 179 | // api server enpoint | ||
| 180 | char server[] = "192.168.6.22"; | ||
| 181 | int port = 5000; | ||
| 182 | |||
| 183 | // api key that must be the same as the one in Python code | ||
| 184 | String api_key = "JtF2aUE5SGHfVJBCG5SH"; | ||
| 185 | |||
| 186 | // frequency data is sent in ms - every 5 seconds | ||
| 187 | int timeout = 1000 * 5; | ||
| 188 | |||
| 189 | int status = WL_IDLE_STATUS; | ||
| 190 | |||
| 191 | void setup() { | ||
| 192 | |||
| 193 | // initialize serial and wait for port to open: | ||
| 194 | Serial.begin(9600); | ||
| 195 | delay(1000); | ||
| 196 | |||
| 197 | // check for the presence of the shield | ||
| 198 | if (WiFi.status() == WL_NO_SHIELD) { | ||
| 199 | Serial.println("WiFi shield not present"); | ||
| 200 | while (true); | ||
| 201 | } | ||
| 202 | |||
| 203 | // attempt to connect to wifi network | ||
| 204 | while (status != WL_CONNECTED) { | ||
| 205 | Serial.print("Attempting to connect to SSID: "); | ||
| 206 | Serial.println(ssid); | ||
| 207 | status = WiFi.begin(ssid, pass); | ||
| 208 | // wait 10 seconds for connection | ||
| 209 | delay(10000); | ||
| 210 | } | ||
| 211 | |||
| 212 | // output wifi status to serial monitor | ||
| 213 | Serial.print("SSID: "); | ||
| 214 | Serial.println(WiFi.SSID()); | ||
| 215 | |||
| 216 | IPAddress ip = WiFi.localIP(); | ||
| 217 | Serial.print("IP Address: "); | ||
| 218 | Serial.println(ip); | ||
| 219 | |||
| 220 | long rssi = WiFi.RSSI(); | ||
| 221 | Serial.print("signal strength (RSSI):"); | ||
| 222 | Serial.print(rssi); | ||
| 223 | Serial.println(" dBm"); | ||
| 224 | } | ||
| 225 | |||
| 226 | void loop() { | ||
| 227 | |||
| 228 | WiFiClient client; | ||
| 229 | |||
| 230 | if (client.connect(server, port)) { | ||
| 231 | |||
| 232 | // I use random number generator for this example | ||
| 233 | // but you can use analog or digital inputs from arduino | ||
| 234 | String content = String(random(1000)); | ||
| 235 | |||
| 236 | client.println("POST /api HTTP/1.1"); | ||
| 237 | client.println("Connection: close"); | ||
| 238 | client.println("Api-Key: " + api_key); | ||
| 239 | client.println("Content-Length: " + String(content.length())); | ||
| 240 | client.println(); | ||
| 241 | client.println(content); | ||
| 242 | |||
| 243 | delay(100); | ||
| 244 | client.stop(); | ||
| 245 | Serial.println("Data sent successfully ..."); | ||
| 246 | |||
| 247 | } else { | ||
| 248 | Serial.println("Problem sending data ..."); | ||
| 249 | } | ||
| 250 | |||
| 251 | // waits for x seconds and continue looping | ||
| 252 | delay(timeout); | ||
| 253 | |||
| 254 | } | ||
| 255 | ``` | ||
| 256 | |||
| 257 | As seen from example you can notice that Arduino is generating random integer between [ 0 .. 1000 ]. You can easily replace this with a temperature sensor or any other kind of sensor. | ||
| 258 | |||
| 259 | Now that we have API under the hood and Arduino is sending demo data we can now focus on data visualization. | ||
| 260 | |||
| 261 | ## Data visualization | ||
| 262 | |||
| 263 | Before we continue we should examine our project folder structure. Currently we only have two files in our project: | ||
| 264 | |||
| 265 | _simple-iot-app/_ | ||
| 266 | |||
| 267 | * _webapp.py_ | ||
| 268 | * _data.db_ | ||
| 269 | |||
| 270 | We will now add HTML template that will contain CSS and JavaScript code inline for the simplicity reason. And for the bottle framework to be able to scan root application folder for templates we will add ```bottle.TEMPLATE_PATH.insert(0, "./")``` in ```webapp.py```. By default bottle framework uses ```views/``` subfolder to store templates. This is not the ideal situation and if you will use bottle to develop web applications you should use native behavior and store templates in it's predefined folder. But for the sake of example we will over-ride this. Be careful to fully replace your code with new code that is provided below. Avoid partially replacing code in file :) Also new code for reading data-points is provided in Python example below. | ||
| 271 | |||
| 272 | First we add new route to our web application. It should be trigger when browser hits root of application ```http://0.0.0.0:5000/```. This route will do nothing more than render ```frontend.html``` template. This is done by ```return bottle.template("frontend.html")```. Check code below to further examine how exactly this is done. | ||
| 273 | |||
| 274 | Now we will expand ```/api``` route and use different methods to write or read data-points. For writing data-point we will use POST method and for reading points we will use GET method. GET method will return JSON object with latest readings and historical data. | ||
| 275 | |||
| 276 | There is a fantastic JavaScript library for plotting time-series charts called [MetricsGraphics.js](https://www.metricsgraphicsjs.org) that is based on [D3.js](https://d3js.org/) library for visualizing data. | ||
| 277 | |||
| 278 | Data schema required by MetricsGraphics.js → to achieve this we need to transform data from database into this format: | ||
| 279 | |||
| 280 | ```json | ||
| 281 | [ | ||
| 282 | { | ||
| 283 | "date": "2017-08-11 01:07:20", | ||
| 284 | "value": 933 | ||
| 285 | }, | ||
| 286 | { | ||
| 287 | "date": "2017-08-11 01:07:30", | ||
| 288 | "value": 743 | ||
| 289 | } | ||
| 290 | ] | ||
| 291 | ``` | ||
| 292 | |||
| 293 | Web application is now complete and we only need ```frontend.html``` that we will develop now. If you would try to start web app now and go to root app this will return error because we don't have frontend.html yet. | ||
| 294 | |||
| 295 | ```python | ||
| 296 | # -*- coding: utf-8 -*- | ||
| 297 | |||
| 298 | import time | ||
| 299 | import bottle | ||
| 300 | import json | ||
| 301 | import datetime | ||
| 302 | import random | ||
| 303 | import dataset | ||
| 304 | |||
| 305 | # initializing bottle app | ||
| 306 | app = bottle.Bottle() | ||
| 307 | |||
| 308 | # adds root directory as template folder | ||
| 309 | bottle.TEMPLATE_PATH.insert(0, "./") | ||
| 310 | |||
| 311 | # connects to sqlite database | ||
| 312 | # check_same_thread=False allows using it in multi-threaded mode | ||
| 313 | app.config["db"] = dataset.connect("sqlite:///data.db?check_same_thread=False") | ||
| 314 | |||
| 315 | # api key that will be used in Arduino code | ||
| 316 | app.config["api_key"] = "JtF2aUE5SGHfVJBCG5SH" | ||
| 317 | |||
| 318 | # triggered when / is accessed from browser | ||
| 319 | # only accepts GET → no POST allowed | ||
| 320 | @app.route("/", method=["GET"]) | ||
| 321 | def route_default(): | ||
| 322 | return bottle.template("frontend.html") | ||
| 323 | |||
| 324 | # triggered when /api is accessed from browser | ||
| 325 | # accepts POST and GET | ||
| 326 | @app.route("/api", method=["GET", "POST"]) | ||
| 327 | def route_default(): | ||
| 328 | |||
| 329 | # if method is POST then we write datapoint | ||
| 330 | if bottle.request.method == "POST": | ||
| 331 | status = 400 | ||
| 332 | ts = int(time.time()) # current timestamp | ||
| 333 | value = bottle.request.body.read() # data from device | ||
| 334 | api_key = bottle.request.get_header("Api-Key") # api key from header | ||
| 335 | |||
| 336 | # outputs to console recieved data for debug reason | ||
| 337 | print ">>> {} :: {}".format(value, api_key) | ||
| 338 | |||
| 339 | # if api_key is correct and value is present | ||
| 340 | # then writes attribute to point table | ||
| 341 | if api_key == app.config["api_key"] and value: | ||
| 342 | app.config["db"]["point"].insert(dict(ts=ts, value=value)) | ||
| 343 | status = 200 | ||
| 344 | |||
| 345 | # we only need to return status | ||
| 346 | return bottle.HTTPResponse(status=status, body="") | ||
| 347 | |||
| 348 | # if method is GET then we read datapoint | ||
| 349 | else: | ||
| 350 | response = [] | ||
| 351 | datapoints = app.config["db"]["point"].all() | ||
| 352 | |||
| 353 | for point in datapoints: | ||
| 354 | response.append({ | ||
| 355 | "date": datetime.datetime.fromtimestamp(int(point["ts"])).strftime("%Y-%m-%d %H:%M:%S"), | ||
| 356 | "value": point["value"] | ||
| 357 | }) | ||
| 358 | |||
| 359 | bottle.response.content_type = "application/json" | ||
| 360 | return json.dumps(response) | ||
| 361 | |||
| 362 | # starting server on http://0.0.0.0:5000 | ||
| 363 | if __name__ == "__main__": | ||
| 364 | bottle.run( | ||
| 365 | app = app, | ||
| 366 | host = "0.0.0.0", | ||
| 367 | port = 5000, | ||
| 368 | debug = True, | ||
| 369 | reloader = True, | ||
| 370 | catchall = True, | ||
| 371 | ) | ||
| 372 | ``` | ||
| 373 | |||
| 374 | And now finally we can implement ```frontend.html```. Create file with this name and copy code below. When you are done you can start web application. Steps for this part are listed below the code. | ||
| 375 | |||
| 376 | ```html | ||
| 377 | <!DOCTYPE html> | ||
| 378 | <html> | ||
| 379 | |||
| 380 | <head> | ||
| 381 | <meta charset="utf-8"> | ||
| 382 | <title>Simple IOT application</title> | ||
| 383 | </head> | ||
| 384 | |||
| 385 | <body> | ||
| 386 | |||
| 387 | <h1>Simple IOT application</h1> | ||
| 388 | |||
| 389 | <div class="chart-placeholder"> | ||
| 390 | <div id="chart"></div> | ||
| 391 | </div> | ||
| 392 | |||
| 393 | <!-- application main script --> | ||
| 394 | <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | ||
| 395 | <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.10.0/d3.min.js"></script> | ||
| 396 | <script src="https://cdnjs.cloudflare.com/ajax/libs/metrics-graphics/2.11.0/metricsgraphics.min.js"></script> | ||
| 397 | <script> | ||
| 398 | function fetch_and_render() { | ||
| 399 | d3.json("/api", function(data) { | ||
| 400 | data = MG.convert.date(data, "date", "%Y-%m-%d %H:%M:%S"); | ||
| 401 | MG.data_graphic({ | ||
| 402 | data: data, | ||
| 403 | chart_type: "line", | ||
| 404 | full_width: true, | ||
| 405 | height: 270, | ||
| 406 | target: document.getElementById("chart"), | ||
| 407 | x_accessor: "date", | ||
| 408 | y_accessor: "value" | ||
| 409 | }); | ||
| 410 | }); | ||
| 411 | } | ||
| 412 | window.onload = function() { | ||
| 413 | // initial call for rendering | ||
| 414 | fetch_and_render(); | ||
| 415 | |||
| 416 | // updates chart every 5 seconds | ||
| 417 | setInterval(function() { | ||
| 418 | fetch_and_render(); | ||
| 419 | }, 5000); | ||
| 420 | } | ||
| 421 | </script> | ||
| 422 | |||
| 423 | <!-- application styles --> | ||
| 424 | <style> | ||
| 425 | body { | ||
| 426 | font: 13px sans-serif; | ||
| 427 | padding: 20px 50px; | ||
| 428 | } | ||
| 429 | .chart-placeholder { | ||
| 430 | border: 2px solid #ccc; | ||
| 431 | width: 100%; | ||
| 432 | user-select: none; | ||
| 433 | } | ||
| 434 | /* chart styles */ | ||
| 435 | .mg-line1-color { | ||
| 436 | stroke: red; | ||
| 437 | stroke-width: 2; | ||
| 438 | } | ||
| 439 | .mg-main-area, .mg-main-line { | ||
| 440 | fill: #fff; | ||
| 441 | } | ||
| 442 | .mg-x-axis line, .mg-y-axis line { | ||
| 443 | stroke: #b3b2b2; | ||
| 444 | stroke-width: 1px; | ||
| 445 | } | ||
| 446 | </style> | ||
| 447 | |||
| 448 | </body> | ||
| 449 | |||
| 450 | </html> | ||
| 451 | ``` | ||
| 452 | |||
| 453 | Now the folder structure should look like: | ||
| 454 | |||
| 455 | _simple-iot-app/_ | ||
| 456 | |||
| 457 | * _webapp.py_ | ||
| 458 | * _data.db_ | ||
| 459 | * _frontend.html_ | ||
| 460 | |||
| 461 | Ok, lets now start application and start feeding it data. | ||
| 462 | |||
| 463 | 1. ```python webapp.py``` | ||
| 464 | 2. connect Arduino MKR1000 to power source | ||
| 465 | 3. open browser and go to ```http://0.0.0.0:5000``` | ||
| 466 | |||
| 467 | If everything goes well you should be seeing new data-points rendered on chart every 5 seconds. | ||
| 468 | |||
| 469 | If you navigate to ```http://0.0.0.0:5000``` you should see rendered chart as shown on picture below. | ||
| 470 | |||
| 471 |  | ||
| 472 | |||
| 473 | Complete application with all the code is available for [download](/files/iot-application/simple-iot-application.zip). | ||
| 474 | |||
| 475 | ## Conclusion | ||
| 476 | |||
| 477 | I hope this clarifies some aspects of IOT application development. Of course this is a minimal example and is far from what can be done in real life with some further dive into other technologies. | ||
| 478 | |||
| 479 | If you would like to continue exploring IOT world here are some interesting resources for you to examine: | ||
| 480 | |||
| 481 | * [Reading Sensors with an Arduino](https://www.allaboutcircuits.com/projects/reading-sensors-with-an-arduino/) | ||
| 482 | * [MQTT 101 – How to Get Started with the lightweight IoT Protocol](http://www.hivemq.com/blog/how-to-get-started-with-mqtt) | ||
| 483 | * [Stream Updates with Server-Sent Events](https://www.html5rocks.com/en/tutorials/eventsource/basics/) | ||
| 484 | * [Internet of Things (IoT) Tutorials](http://www.tutorialspoint.com/internet_of_things/) | ||
| 485 | |||
| 486 | Any comment or additional ideas are welcomed in comments below. | ||
diff --git a/src/blog/simplifying-and-reducing-clutter.md b/src/blog/simplifying-and-reducing-clutter.md new file mode 100644 index 0000000..b435834 --- /dev/null +++ b/src/blog/simplifying-and-reducing-clutter.md | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | title: Simplifying and reducing clutter in my life and work | ||
| 2 | date: 2019-10-14 | ||
| 3 | tags: blog | ||
| 4 | hide: false | ||
| 5 | ---- | ||
| 6 | |||
| 7 | I recently moved my main working machine back from Hachintosh to Linux. Well the experiment was interesting and I have done some great work on macOS but it was time to move back. | ||
| 8 | |||
| 9 | I actually really missed Linux. The simplicity of `apt-get` or just the amount of software that exists for Linux should be a no-brainer. I spent most of my time on macOS finding solutions to make things work. Using [Brew](https://brew.sh/) was just a horrible experience and far from package managers of Linux. At least they managed to get that `sudo` debacle sorted. | ||
| 10 | |||
| 11 | Not all was bad. macOS in general was a perfectly good environment. Things like Docker and tooling like this worked without any hiccups. My normal tools like coding IDE worked flawlessly and the whole look and feel is just superb. I have been using MacBook Air for couple of years so I was used to the system but never as a daily driver. | ||
| 12 | |||
| 13 | One of the things I did after I installed Linux back on my machine was cleaning up my Dropbox folder. I have everything on Dropbox. Even projects folder. I write code for living so my whole life revolves around couple of megs of code (with assets). So it's not like I have huge files on my machine. I don't have movies or music or pictures on my PC. All of that stuff is in cloud. I use Google music and I have Netflix account which is more than enough for me. | ||
| 14 | |||
| 15 | I also went and deleted some of the repositories on my Github account. I have deleted more code than deployed. People find this strange but for me deleting something feels so cathartic and also forces me to write better code next time around when I am faced with similar problem. That was a huge relief if I am being totally honest. | ||
| 16 | |||
| 17 | Next step was to do something with my webpage. I have been using some scripts I wrote a while ago to generate static pages from markdown source posts. I kept on adding and adding stuff on top of it and it became a source of a frustration. And this is just a simple blog and I was using gulp and npm. Anyways after couple of hours of searching and testing static generators I found an interesting one [https://github.com/piranha/gostatic](https://github.com/piranha/gostatic) and I just decided to use this one. It was the only one that had a simple templating engine, not that I really need one. But others had this convoluted way of trying to solve everything and at the end just required quite bigger learning curve I was ready to go with. So I deleted couple of old posts, simplified HTML, trashed most of the CSS and went with [https://motherfuckingwebsite.com/](https://motherfuckingwebsite.com/) aesthetics. Yeah, the previous site was more visually stimulating but all I really care is the content at this point. And Times New Roman font is kind of awesome. | ||
| 18 | |||
| 19 | I stopped working on most of the projects in the past couple of months because the overhead was just too insane. There comes a point when you stretch yourself too much and then you stop progressing and with that comes dissatisfaction. | ||
| 20 | |||
| 21 | So that's about it. Moving forward minimal style. | ||
diff --git a/src/blog/what-i-ve-learned-developing-ad-server.md b/src/blog/what-i-ve-learned-developing-ad-server.md new file mode 100644 index 0000000..527f9d0 --- /dev/null +++ b/src/blog/what-i-ve-learned-developing-ad-server.md | |||
| @@ -0,0 +1,133 @@ | |||
| 1 | title: What I've learned developing ad server | ||
| 2 | date: 2017-04-17 | ||
| 3 | tags: blog | ||
| 4 | hide: false | ||
| 5 | ---- | ||
| 6 | |||
| 7 | For the past year and half I have been developing native advertising server that contextually matches ads and displays them in different template forms on variety of websites. This project grew from serving thousands of ads per day to millions. | ||
| 8 | |||
| 9 | The system is made from couple of core components: | ||
| 10 | |||
| 11 | - API for serving ads, | ||
| 12 | - Utils - cronjobs and queue management tools, | ||
| 13 | - Dashboard UI. | ||
| 14 | |||
| 15 | Initial release was using [MongoDB](https://www.mongodb.com/) for full-text search but was later replaced by [Elasticsearch](https://www.elastic.co/) for better CPU utilization and better search performance. This provided us with many amazing functionalities of [Elasticsearch](https://www.elastic.co/). You should check it out if you do any search related operations. | ||
| 16 | |||
| 17 | Because the premise of the server is to provide native ad experience, they are rendered on the client side via simple templating engine. This ensures that ads can be displayed number of different ways based on the visual style of the page. And this makes JavaScript client library quite complex. | ||
| 18 | |||
| 19 | So now that you know basic information about the product lets get into the lessons we learned. | ||
| 20 | |||
| 21 | ## Aggregate everything | ||
| 22 | |||
| 23 | After beta version was released everything (impressions, clicks, etc) was written in nanosecond resolution in the database. At that time we were using [PostgreSQL](https://www.postgresql.org/) and database quickly grew way above 200GB in disk space. And that was problematic. Statistics took disturbingly long time to aggregate. Also using indexes on stats table in database was no help after we reached 500 million datapoints. | ||
| 24 | |||
| 25 | > There is a marketing product information and there is real life experience. And the tend to be quite the opposite. | ||
| 26 | |||
| 27 | This was the reason that now everything is aggregated on daily basis and this data is then fed to Elastic in form of daily summary. With this we achieved we can now track many more dimensions such as zone, channel and platform information. And with this information we can now adapt occurrences of ads on specific places more precisely. | ||
| 28 | |||
| 29 | We have also adapted [Redis](https://redis.io/) as a full-time citizen in our stack. Because Redis also stores information on a local disk we have some sort of backup if server would accidentally suffer some failure. | ||
| 30 | |||
| 31 | All the real-time statistics for ad serving and redirecting is presented as counters in Redis instance and daily extracted and pushed to Elastic. | ||
| 32 | |||
| 33 | ## Measure everything | ||
| 34 | |||
| 35 | The thing about software is that we really don't know how well it is performing under load until such load is presented. When testing locally everything is fine but when on production things tend to fall apart. | ||
| 36 | |||
| 37 | As a solution for this we are measuring everything we can. Function execution time (by encapsulating functions with timers), server performance (cpu, memory, disk, etc), Nginx and [uWSGI](https://uwsgi-docs.readthedocs.io/) performance. We sacrifice a bit of performance for the sake of this information. And we store all this information for later analysis. | ||
| 38 | |||
| 39 | **Example of function execution time** | ||
| 40 | |||
| 41 | ```json | ||
| 42 | { | ||
| 43 | "get_final_filtered_ads": { | ||
| 44 | "counter": 1931250, | ||
| 45 | "avg": 0.0066143431, | ||
| 46 | "elapsed": 12773.9500310003 | ||
| 47 | }, | ||
| 48 | "store_keywords_statistics": { | ||
| 49 | "counter": 1931011, | ||
| 50 | "avg": 0.0004605267, | ||
| 51 | "elapsed": 889.2821669996 | ||
| 52 | }, | ||
| 53 | "match_by_context": { | ||
| 54 | "counter": 1931011, | ||
| 55 | "avg": 0.0055960716, | ||
| 56 | "elapsed": 10806.0758889999 | ||
| 57 | }, | ||
| 58 | "match_by_high_performance": { | ||
| 59 | "counter": 262, | ||
| 60 | "avg": 0.0152770229, | ||
| 61 | "elapsed": 4.00258 | ||
| 62 | }, | ||
| 63 | "store_impression_stats": { | ||
| 64 | "counter": 1931250, | ||
| 65 | "avg": 0.0006189991, | ||
| 66 | "elapsed": 1195.4419869999 | ||
| 67 | } | ||
| 68 | } | ||
| 69 | ``` | ||
| 70 | |||
| 71 | We have also started profiling with [cProfile](https://pymotw.com/2/profile/) and then visualizing with [KCachegrind](http://kcachegrind.sourceforge.net/). This provides much more detailed look into code execution. | ||
| 72 | |||
| 73 | ## Cache control is your friend | ||
| 74 | |||
| 75 | Because we use Javascript library for rendering ads we rely on this script extensively and when in need we need to be able to change behavior of the script quickly. | ||
| 76 | |||
| 77 | In our case we can not simply replace javascript url in html code. It usually takes a day or two for the guys who maintain sites to change code or add ?ver=xxx attribute. And this makes rapid deployment and testing very difficult and time consuming. There is a limitation of how much you can test locally. | ||
| 78 | |||
| 79 | We are now in the process of integrating [Google Tag Manager](https://www.google.com/analytics/tag-manager/) but couple of websites are developed on ASP.net platform that have some problems with tag manager. With a solution below we are certain that we are serving latest version of the script. | ||
| 80 | |||
| 81 | And it only takes one mistake and users have the script cached and in case of caching it for 1 year you probably know where the problem is. | ||
| 82 | |||
| 83 | ```nginx | ||
| 84 | # nginx ➜ /etc/nginx/sites-available/default | ||
| 85 | location /static/ { | ||
| 86 | alias /path-to-static-content/; | ||
| 87 | autoindex off; | ||
| 88 | charset utf-8; | ||
| 89 | gzip on; | ||
| 90 | gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css; | ||
| 91 | location ~* \.(ico|gif|jpeg|jpg|png|woff|ttf|otf|svg|woff2|eot)$ { | ||
| 92 | expires 1y; | ||
| 93 | add_header Pragma public; | ||
| 94 | add_header Cache-Control "public"; | ||
| 95 | } | ||
| 96 | location ~* \.(css|js|txt)$ { | ||
| 97 | expires 3600s; | ||
| 98 | add_header Pragma public; | ||
| 99 | add_header Cache-Control "public, must-revalidate"; | ||
| 100 | } | ||
| 101 | } | ||
| 102 | ``` | ||
| 103 | |||
| 104 | Also be careful when redirecting to url in your python code. We noticed that if we didn't precisely setup cache control and expire headers in response we didn't get the request on the server and therefore couldn't measure clicks. So when redirecting do as follows and there will be no problems. | ||
| 105 | |||
| 106 | ```python | ||
| 107 | # python ➜ bottlepy web micro-framework | ||
| 108 | response = bottle.HTTPResponse(status=302) | ||
| 109 | response.set_header("Cache-Control", "no-store, no-cache, must-revalidate") | ||
| 110 | response.set_header("Expires", "Thu, 01 Jan 1970 00:00:00 GMT") | ||
| 111 | response.set_header("Location", url) | ||
| 112 | return response | ||
| 113 | ``` | ||
| 114 | |||
| 115 | > Cache control in browsers is quite aggressive and you need to be precise to avoid future problems. We learned that lesson the hard way. | ||
| 116 | |||
| 117 | ## Learn NGINX | ||
| 118 | |||
| 119 | When deciding on a web server we went with Nginx as a reverse proxy for our applications. We adapted micro-service oriented architecture early in the project to ensure when we scale we can easily add additional servers to our cluster. And Nginx was crucial to perform load balancing and static content delivery. | ||
| 120 | |||
| 121 | At first our config file was quite simple and later grew larger. After patching and adding new settings I sat down and learned more about the guts of Nginx. This proved to be very useful and we were able to squeeze much more out of our setup. So I advise you to take your time and read through the [documentation](https://nginx.org/en/docs/). This saved us a lot of headache. Googling for solutions only goes so far. | ||
| 122 | |||
| 123 | ## Use Redis/Memcached | ||
| 124 | |||
| 125 | As explained above we are using caching basically for everything. It is the corner stone of our services. At first we were very careful about the quantity of things we stored in [Redis](https://redis.io/). But we later found out that the memory footprint is very low even when storing large amount of data in it. | ||
| 126 | |||
| 127 | So we gradually increased our usage to caching whole HTML outputs of dashboard. This improved our performance in order of magnitude. And by using native TTL support this goes hand in hand with our needs. | ||
| 128 | |||
| 129 | The reason why we choose [Redis](https://redis.io/) over [Memcached](https://memcached.org/) was the nature of scalability of Redis out of the box. But all this can be achieved with Memcached. | ||
| 130 | |||
| 131 | ## Conclusion | ||
| 132 | |||
| 133 | There are a lot more details that could have been written and every single topic in here deserves it's own post but you probably got the idea about the problems we faced. | ||
diff --git a/src/curriculum-vitae.md b/src/curriculum-vitae.md new file mode 100644 index 0000000..29c576d --- /dev/null +++ b/src/curriculum-vitae.md | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | title: Curriculum Vitae | ||
| 2 | date: 2018-01-16 | ||
| 3 | tags: research | ||
| 4 | hide: false | ||
| 5 | ---- | ||
| 6 | |||
| 7 | **Mitja Felicijan** | ||
| 8 | |||
| 9 | *[mitja.felicijan@gmail.com](mailto:mitja.felicijan@gmail.com?subject=Website+CV+Contact)* | ||
| 10 | |||
| 11 | *Slovenia, EU* | ||
| 12 | |||
| 13 | ## Technical experience | ||
| 14 | |||
| 15 | - **Key languages:** Golang, Python, C, Bash. | ||
| 16 | - **Platforms:** GNU/Linux, macOS. | ||
| 17 | - **Fields of study:** Zigbee, KNX, Modbus, Machine to Machine, Embedded systems, Operating systems, Distributed systems, IOT, RDBMS, Algorithms, Database engine design, SQL, NoSQL, NewSQL, Big data analytics, Machine learning, Prediction algorithms, Realtime analytics, Systems automation, Natural language processing, Bioinformatics. | ||
| 18 | |||
| 19 | ## Major projects | ||
| 20 | |||
| 21 | - SMS marketing system (2007) | ||
| 22 | - Yacht management software (2008) | ||
| 23 | - Smart Home Gateway (2009) | ||
| 24 | - Moxa UPort 1130 USB to RS485 Universal Linux driver (2009) | ||
| 25 | - Remote management of electricity meter (2009) | ||
| 26 | - Remote management of blood pressure monitor (2010) | ||
| 27 | - Infomat automation system (2010) | ||
| 28 | - GPS Tourist - GIS Software (2011) | ||
| 29 | - Minimal GNU/Linux distribution for embedded platforms (2011) | ||
| 30 | - Digital Jukebox system (2012) | ||
| 31 | - NanoCloudLogger - Machine to Machine (2012) | ||
| 32 | - Street Lightning System (2012) | ||
| 33 | - Smart cabins with hardware sensor management (2013) | ||
| 34 | - Contextual advertising server (2015) | ||
| 35 | - Network accessible database engine for caching and in-memory storage (2016) | ||
| 36 | - Tick database engine specifically designed for storing and processing large amount of sensor data with high write throughput (2016) | ||
| 37 | - Wireless industrial lighting management system - hardware and software (2016) | ||
| 38 | - Minimal configuration reverse proxy (2017) | ||
| 39 | - Industrial IOT platform for deployment on on-premise (2018) | ||
| 40 | - Custom Platform as a service based on Docker Swarm (2018) | ||
| 41 | - Toolkit for encoding binary data into DNA sequence (2019) | ||
| 42 | - Minimal configuration reverse proxy with load balancing and rate limiting (2019) | ||
| 43 | - E-ink conference room occupancy display, hadrware and software solution (2019) | ||
| 44 | |||
| 45 | ## Employment history | ||
| 46 | |||
| 47 | - Freelancer (2001 – Present) | ||
| 48 | - Software developer at Mobinia (2005 – 2007) | ||
| 49 | - CTO at Milk (2007 – 2009) | ||
| 50 | - Co-Founder of UTS (2009 – 2014) | ||
| 51 | - Senior Software Engineer at TSmedia (2015 - 2017) | ||
| 52 | - Senior Software Engineer at Renderspace (2017 - 2019) | ||
| 53 | - IT Consultant (2017 – Present) | ||
| 54 | |||
| 55 | ## Awards | ||
| 56 | |||
| 57 | - Regional Award for Innovation by Chamber of Commerce and Industry of Slovenia for project Intelligent system management and regulation of Street Lighting, 2010 | ||
| 58 | - National Award for Innovation by Chamber of Commerce and Industry of Slovenia for project Intelligent system management and regulation of Street Lighting, 2010 | ||
| 59 | |||
| 60 | ## Key responsibilities | ||
| 61 | |||
| 62 | - Embedded platform development. | ||
| 63 | - Hardware design and driver development. | ||
| 64 | - Designing, developing and testing systems. | ||
| 65 | - Implementation of the systems. | ||
| 66 | - Writing and maintaining user and technical documents. | ||
| 67 | - Development and maintenance of the project. | ||
| 68 | - Code revision, testing and output. | ||
| 69 | - Work on the enhancement suggested by the customers and fixes the bugs reported. | ||
diff --git a/src/feed.atom b/src/feed.atom new file mode 100644 index 0000000..9dc15ae --- /dev/null +++ b/src/feed.atom | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0"> | ||
| 3 | <id>{{ .Site.Other.Url }}</id> | ||
| 4 | <title>{{ .Site.Other.Title }}</title> | ||
| 5 | {{ with .Site.Pages.Children "blog/" }} | ||
| 6 | <updated>{{ .First.Date.Format "2006-01-02T15:04:05Z07:00" }}</updated> | ||
| 7 | {{ end }} | ||
| 8 | <author><name>{{ .Site.Other.Author }}</name></author> | ||
| 9 | <link href="{{ .Site.Other.Url }}" rel="alternate"></link> | ||
| 10 | <generator uri="https://github.com/piranha/gostatic">gostatic</generator> | ||
| 11 | |||
| 12 | {{ with .Site.Pages.Children "blog/" }} | ||
| 13 | {{ range .Slice 0 5 }} | ||
| 14 | <entry> | ||
| 15 | <id>{{ .Url }}</id> | ||
| 16 | <author><name>{{ or .Other.Author .Site.Other.Author }}</name></author> | ||
| 17 | <title type="html">{{ html .Title }}</title> | ||
| 18 | <published>{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}</published> | ||
| 19 | {{ range .Tags }} | ||
| 20 | <category term="{{ . }}"></category> | ||
| 21 | {{ end }} | ||
| 22 | <link href="{{ .Site.Other.Url }}/{{ .Url }}" rel="alternate"></link> | ||
| 23 | <content type="html"> | ||
| 24 | {{/* .Process runs here in case only feed changed */}} | ||
| 25 | {{ with cut "<section>" "</section>" .Process.Content }} | ||
| 26 | {{ html . }} | ||
| 27 | {{ end }} | ||
| 28 | </content> | ||
| 29 | </entry> | ||
| 30 | {{ end }} | ||
| 31 | {{ end }} | ||
| 32 | |||
| 33 | {{ with .Site.Pages.Children "research/" }} | ||
| 34 | {{ range .Slice 0 5 }} | ||
| 35 | <entry> | ||
| 36 | <id>{{ .Url }}</id> | ||
| 37 | <author><name>{{ or .Other.Author .Site.Other.Author }}</name></author> | ||
| 38 | <title type="html">{{ html .Title }}</title> | ||
| 39 | <published>{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}</published> | ||
| 40 | {{ range .Tags }} | ||
| 41 | <category term="{{ . }}"></category> | ||
| 42 | {{ end }} | ||
| 43 | <link href="{{ .Site.Other.Url }}/{{ .Url }}" rel="alternate"></link> | ||
| 44 | <content type="html"> | ||
| 45 | {{/* .Process runs here in case only feed changed */}} | ||
| 46 | {{ with cut "<section>" "</section>" .Process.Content }} | ||
| 47 | {{ html . }} | ||
| 48 | {{ end }} | ||
| 49 | </content> | ||
| 50 | </entry> | ||
| 51 | {{ end }} | ||
| 52 | {{ end }} | ||
| 53 | |||
| 54 | |||
| 55 | </feed> | ||
diff --git a/src/files/dna-sequence/benchmarks.ods b/src/files/dna-sequence/benchmarks.ods new file mode 100644 index 0000000..62a8e30 --- /dev/null +++ b/src/files/dna-sequence/benchmarks.ods | |||
| Binary files differ | |||
diff --git a/src/files/dna-sequence/chart-encoding-speed.png b/src/files/dna-sequence/chart-encoding-speed.png new file mode 100644 index 0000000..7fb106d --- /dev/null +++ b/src/files/dna-sequence/chart-encoding-speed.png | |||
| Binary files differ | |||
diff --git a/src/files/dna-sequence/chart-file-sizes.png b/src/files/dna-sequence/chart-file-sizes.png new file mode 100644 index 0000000..31bfa66 --- /dev/null +++ b/src/files/dna-sequence/chart-file-sizes.png | |||
| Binary files differ | |||
diff --git a/src/files/dna-sequence/dna-basics.jpg b/src/files/dna-sequence/dna-basics.jpg new file mode 100644 index 0000000..c2e7f52 --- /dev/null +++ b/src/files/dna-sequence/dna-basics.jpg | |||
| Binary files differ | |||
diff --git a/src/files/dna-sequence/quote.png b/src/files/dna-sequence/quote.png new file mode 100644 index 0000000..09fb01c --- /dev/null +++ b/src/files/dna-sequence/quote.png | |||
| Binary files differ | |||
diff --git a/src/files/dna-sequence/sample-binary-file.png b/src/files/dna-sequence/sample-binary-file.png new file mode 100644 index 0000000..1e4622a --- /dev/null +++ b/src/files/dna-sequence/sample-binary-file.png | |||
| Binary files differ | |||
diff --git a/src/files/dna-sequence/sample.png b/src/files/dna-sequence/sample.png new file mode 100644 index 0000000..30f12da --- /dev/null +++ b/src/files/dna-sequence/sample.png | |||
| Binary files differ | |||
diff --git a/src/files/do-fuse/copy-benchmarks.tsv b/src/files/do-fuse/copy-benchmarks.tsv new file mode 100644 index 0000000..c7a7af4 --- /dev/null +++ b/src/files/do-fuse/copy-benchmarks.tsv | |||
| @@ -0,0 +1,101 @@ | |||
| 1 | 10KB 100KB 1MB 10MB | ||
| 2 | 0.15 0.187 0.317 0.653 | ||
| 3 | 0.158 0.237 0.192 0.659 | ||
| 4 | 0.134 0.359 0.236 0.604 | ||
| 5 | 0.136 0.292 0.196 0.501 | ||
| 6 | 4.411 4.479 4.376 0.649 | ||
| 7 | 0.134 0.481 0.265 0.608 | ||
| 8 | 0.146 0.266 0.28 0.516 | ||
| 9 | 4.282 0.307 4.549 0.562 | ||
| 10 | 0.152 0.28 0.229 0.512 | ||
| 11 | 0.162 0.37 0.315 0.652 | ||
| 12 | 0.13 4.735 0.222 5.171 | ||
| 13 | 4.29 8.767 0.283 5.076 | ||
| 14 | 4.555 4.682 0.318 4.941 | ||
| 15 | 4.658 4.691 0.177 9.624 | ||
| 16 | 4.778 4.791 4.415 5.114 | ||
| 17 | 8.794 8.604 0.311 5.223 | ||
| 18 | 4.582 4.727 0.234 9.28 | ||
| 19 | 4.596 4.638 0.212 5.064 | ||
| 20 | 4.7 4.65 4.458 5.221 | ||
| 21 | 8.822 9.159 0.191 5.032 | ||
| 22 | 4.628 4.641 0.324 9.226 | ||
| 23 | 4.6 4.921 0.197 5.22 | ||
| 24 | 8.85 4.58 4.405 5.245 | ||
| 25 | 4.65 9.142 0.215 5.168 | ||
| 26 | 4.884 6.67 0.248 9.273 | ||
| 27 | 4.581 4.594 0.248 5.082 | ||
| 28 | 8.864 4.844 4.502 5.121 | ||
| 29 | 4.704 4.656 0.177 5.173 | ||
| 30 | 4.616 8.883 0.209 9.334 | ||
| 31 | 4.729 4.962 4.366 4.966 | ||
| 32 | 8.918 4.682 0.186 6.702 | ||
| 33 | 4.686 4.58 0.168 5.111 | ||
| 34 | 5.123 8.84 4.747 5.084 | ||
| 35 | 4.846 4.732 8.85 5.065 | ||
| 36 | 8.887 4.639 4.824 9.286 | ||
| 37 | 4.681 8.897 4.791 5.104 | ||
| 38 | 4.649 4.682 4.835 5.194 | ||
| 39 | 8.847 4.663 8.929 5.271 | ||
| 40 | 4.568 4.604 4.762 9.444 | ||
| 41 | 4.657 8.74 4.772 5.076 | ||
| 42 | 4.636 4.724 4.838 5.168 | ||
| 43 | 8.778 4.846 9.065 5.057 | ||
| 44 | 4.995 4.571 5.074 9.314 | ||
| 45 | 2.343 9.222 4.818 5.732 | ||
| 46 | 4.742 4.646 8.909 5.32 | ||
| 47 | 4.82 4.842 4.778 5.167 | ||
| 48 | 8.791 4.66 4.759 5.157 | ||
| 49 | 4.835 8.944 4.804 9.323 | ||
| 50 | 4.599 5.594 8.952 5.299 | ||
| 51 | 4.809 4.628 1.567 5.294 | ||
| 52 | 8.744 4.771 5.59 5.018 | ||
| 53 | 4.71 8.919 4.771 9.257 | ||
| 54 | 4.704 4.7 9.003 5.064 | ||
| 55 | 4.765 4.605 4.781 5.185 | ||
| 56 | 8.866 4.669 4.844 5.392 | ||
| 57 | 4.897 8.925 4.786 9.279 | ||
| 58 | 4.568 5.168 8.893 5.1 | ||
| 59 | 4.679 4.757 5.41 5.232 | ||
| 60 | 8.922 4.702 4.7 1.984 | ||
| 61 | 4.669 8.721 4.906 5.366 | ||
| 62 | 4.707 4.555 8.96 5.245 | ||
| 63 | 8.938 4.615 4.89 5.216 | ||
| 64 | 4.608 4.621 4.677 9.237 | ||
| 65 | 4.58 8.954 4.908 5.194 | ||
| 66 | 4.707 4.575 8.968 5.017 | ||
| 67 | 8.822 4.781 4.882 9.714 | ||
| 68 | 4.674 8.833 4.834 5.02 | ||
| 69 | 5.005 4.689 4.762 5.312 | ||
| 70 | 4.732 4.799 9.111 5.286 | ||
| 71 | 8.894 4.675 4.936 5.185 | ||
| 72 | 4.747 8.764 4.739 9.312 | ||
| 73 | 4.785 4.749 4.845 5.34 | ||
| 74 | 4.656 4.705 9.181 5.256 | ||
| 75 | 8.899 4.601 4.739 5.261 | ||
| 76 | 4.594 8.813 4.576 9.329 | ||
| 77 | 4.585 4.716 8.813 5.343 | ||
| 78 | 8.718 4.723 4.819 5.092 | ||
| 79 | 4.725 4.757 4.83 5.061 | ||
| 80 | 4.737 8.899 4.772 9.488 | ||
| 81 | 4.692 4.717 8.831 5.13 | ||
| 82 | 8.841 4.951 4.787 5.309 | ||
| 83 | 4.66 8.895 4.746 5.228 | ||
| 84 | 4.749 4.595 4.833 5.26 | ||
| 85 | 4.715 4.615 8.928 9.381 | ||
| 86 | 8.849 4.651 4.826 5.289 | ||
| 87 | 4.66 8.897 4.802 5.197 | ||
| 88 | 4.588 4.844 4.883 9.311 | ||
| 89 | 4.753 4.888 9.053 5.072 | ||
| 90 | 8.841 4.737 4.75 5.157 | ||
| 91 | 4.794 8.976 5.063 5.196 | ||
| 92 | 4.544 4.673 9.036 9.335 | ||
| 93 | 8.74 4.654 6.377 5.29 | ||
| 94 | 4.729 4.752 5.001 5.048 | ||
| 95 | 4.654 8.98 4.873 5.544 | ||
| 96 | 4.9 4.606 4.723 5.192 | ||
| 97 | 8.757 4.802 5.427 9.056 | ||
| 98 | 4.859 8.969 4.816 5.3 | ||
| 99 | 4.701 4.662 9.002 5.138 | ||
| 100 | 4.943 4.813 4.894 5.15 | ||
| 101 | 8.772 4.721 4.785 9.168 | ||
diff --git a/src/files/do-fuse/fuse-droplets.png b/src/files/do-fuse/fuse-droplets.png new file mode 100644 index 0000000..d7ce243 --- /dev/null +++ b/src/files/do-fuse/fuse-droplets.png | |||
| Binary files differ | |||
diff --git a/src/files/do-fuse/fuse-spaces.png b/src/files/do-fuse/fuse-spaces.png new file mode 100644 index 0000000..4dcc1c5 --- /dev/null +++ b/src/files/do-fuse/fuse-spaces.png | |||
| Binary files differ | |||
diff --git a/src/files/do-fuse/sqlite-benchmarks.tsv b/src/files/do-fuse/sqlite-benchmarks.tsv new file mode 100644 index 0000000..daa2c21 --- /dev/null +++ b/src/files/do-fuse/sqlite-benchmarks.tsv | |||
| @@ -0,0 +1,1001 @@ | |||
| 1 | DROPTABLE CREATETABLE INSERTMANY FETCHALL COMMIT | ||
| 2 | 0.000732 0.000400 0.008133 0.000065 0.000166 | ||
| 3 | 0.000200 0.000214 0.003105 0.000043 0.000171 | ||
| 4 | 0.000246 0.000170 0.006594 0.000044 0.000101 | ||
| 5 | 0.000182 0.000166 0.003892 0.000043 0.000112 | ||
| 6 | 0.000248 0.000654 0.002308 0.000041 0.000090 | ||
| 7 | 0.000240 0.000184 0.002253 0.000053 0.000110 | ||
| 8 | 0.000698 0.000483 0.003737 0.000041 0.000165 | ||
| 9 | 0.000217 0.000179 0.002470 0.000049 0.000107 | ||
| 10 | 0.000243 0.000160 0.002668 0.000054 0.000340 | ||
| 11 | 0.000196 0.000169 0.002247 0.000040 0.000096 | ||
| 12 | 0.000191 0.000162 0.003522 0.000260 0.000102 | ||
| 13 | 0.000195 0.000188 0.002325 0.000041 0.000132 | ||
| 14 | 0.000194 0.000202 0.002291 0.000039 0.000091 | ||
| 15 | 0.000195 0.000196 0.004114 0.000042 0.000108 | ||
| 16 | 0.000204 0.000200 0.002971 0.000040 0.000106 | ||
| 17 | 0.000227 0.000159 0.002208 0.000039 0.000117 | ||
| 18 | 0.000207 0.000176 0.003558 0.000040 0.000124 | ||
| 19 | 0.000255 0.000179 0.002870 0.000040 0.000125 | ||
| 20 | 0.000209 0.000176 0.002248 0.000040 0.000176 | ||
| 21 | 0.000211 0.000174 0.002661 0.000039 0.000180 | ||
| 22 | 0.000208 0.000219 0.002321 0.000039 0.000151 | ||
| 23 | 0.000212 0.000178 0.002609 0.000040 0.000132 | ||
| 24 | 0.000205 0.000209 0.002666 0.000039 0.000126 | ||
| 25 | 0.000205 0.000176 0.002501 0.000041 0.000133 | ||
| 26 | 0.000243 0.000183 0.002220 0.000037 0.000117 | ||
| 27 | 0.000504 0.000173 0.002230 0.000121 0.000414 | ||
| 28 | 0.000270 0.000200 0.002325 0.000040 0.000154 | ||
| 29 | 0.000208 0.000176 0.002386 0.000038 0.000123 | ||
| 30 | 0.000229 0.000182 0.002245 0.000039 0.000127 | ||
| 31 | 0.000211 0.000176 0.002544 0.000039 0.000136 | ||
| 32 | 0.000204 0.000180 0.002133 0.000037 0.000129 | ||
| 33 | 0.000205 0.000178 0.002330 0.000048 0.000146 | ||
| 34 | 0.000210 0.000178 0.002242 0.000039 0.000109 | ||
| 35 | 0.000210 0.000259 0.002766 0.000039 0.000118 | ||
| 36 | 0.000317 0.000495 0.002237 0.000039 0.000195 | ||
| 37 | 0.000454 0.000246 0.002447 0.000040 0.000172 | ||
| 38 | 0.000936 0.000200 0.002305 0.000057 0.000173 | ||
| 39 | 0.000263 0.000178 0.002251 0.000038 0.000166 | ||
| 40 | 0.000240 0.000183 0.002169 0.000068 0.000176 | ||
| 41 | 0.000251 0.000189 0.002221 0.000038 0.000141 | ||
| 42 | 0.000268 0.000215 0.002322 0.000039 0.000226 | ||
| 43 | 0.000287 0.000223 0.002696 0.000045 0.000247 | ||
| 44 | 0.000362 0.000229 0.002551 0.000043 0.000133 | ||
| 45 | 0.000239 0.000200 0.002621 0.000045 0.000133 | ||
| 46 | 0.000634 0.000208 0.002619 0.000046 0.000138 | ||
| 47 | 0.000236 0.000205 0.002589 0.000046 0.000137 | ||
| 48 | 0.000262 0.000205 0.002607 0.000045 0.000142 | ||
| 49 | 0.000239 0.000198 0.002754 0.000044 0.000185 | ||
| 50 | 0.000238 0.000198 0.002593 0.000057 0.000160 | ||
| 51 | 0.000242 0.000221 0.003784 0.000122 0.000174 | ||
| 52 | 0.000242 0.000201 0.002625 0.000054 0.000148 | ||
| 53 | 0.000296 0.000225 0.002934 0.000044 0.000134 | ||
| 54 | 0.000239 0.000245 0.003428 0.000046 0.000158 | ||
| 55 | 0.000261 0.000251 0.002569 0.000046 0.000139 | ||
| 56 | 0.000260 0.000230 0.002603 0.000045 0.000145 | ||
| 57 | 0.000302 0.000212 0.002580 0.000045 0.000176 | ||
| 58 | 0.000794 0.000197 0.002856 0.000046 0.000141 | ||
| 59 | 0.000273 0.000209 0.003173 0.000045 0.000217 | ||
| 60 | 0.000240 0.000201 0.002844 0.000043 0.000167 | ||
| 61 | 0.000389 0.000175 0.004315 0.000055 0.000091 | ||
| 62 | 0.000275 0.000534 0.004991 0.000053 0.000092 | ||
| 63 | 0.000229 0.000215 0.004084 0.000045 0.000074 | ||
| 64 | 0.000172 0.000474 0.002611 0.000043 0.000069 | ||
| 65 | 0.000201 0.000174 0.002485 0.000043 0.000069 | ||
| 66 | 0.000173 0.000220 0.002541 0.000045 0.000068 | ||
| 67 | 0.000167 0.000161 0.002827 0.000043 0.000071 | ||
| 68 | 0.000168 0.000160 0.003512 0.000068 0.000075 | ||
| 69 | 0.000211 0.000167 0.002530 0.000044 0.000069 | ||
| 70 | 0.000193 0.000230 0.003664 0.000046 0.000074 | ||
| 71 | 0.000171 0.000161 0.002575 0.000076 0.000075 | ||
| 72 | 0.000169 0.000161 0.002595 0.000044 0.000076 | ||
| 73 | 0.000981 0.000174 0.002556 0.000045 0.000072 | ||
| 74 | 0.000168 0.000163 0.002568 0.000043 0.000072 | ||
| 75 | 0.000163 0.000158 0.002579 0.000043 0.000386 | ||
| 76 | 0.000168 0.000160 0.002579 0.000059 0.000088 | ||
| 77 | 0.000176 0.000163 0.002559 0.000044 0.000075 | ||
| 78 | 0.000167 0.000161 0.002558 0.000043 0.000075 | ||
| 79 | 0.000169 0.000161 0.002599 0.000043 0.000095 | ||
| 80 | 0.000174 0.000163 0.002633 0.000046 0.000076 | ||
| 81 | 0.000170 0.000165 0.002576 0.000858 0.000079 | ||
| 82 | 0.000169 0.000162 0.002611 0.000044 0.000075 | ||
| 83 | 0.000170 0.000199 0.002621 0.000043 0.000074 | ||
| 84 | 0.000170 0.000167 0.003611 0.000043 0.000073 | ||
| 85 | 0.000171 0.000159 0.002764 0.000046 0.000076 | ||
| 86 | 0.000171 0.000165 0.002639 0.000044 0.000073 | ||
| 87 | 0.000168 0.000162 0.003131 0.000046 0.000075 | ||
| 88 | 0.000170 0.000162 0.002858 0.000044 0.000074 | ||
| 89 | 0.000171 0.000164 0.002841 0.000043 0.000075 | ||
| 90 | 0.000167 0.000161 0.002971 0.000043 0.000074 | ||
| 91 | 0.000170 0.000226 0.002842 0.000044 0.000074 | ||
| 92 | 0.000171 0.000165 0.002822 0.000044 0.000075 | ||
| 93 | 0.000173 0.000160 0.002895 0.000045 0.000073 | ||
| 94 | 0.000167 0.000217 0.002697 0.000044 0.000076 | ||
| 95 | 0.000170 0.000197 0.002699 0.000044 0.000075 | ||
| 96 | 0.000171 0.000163 0.003230 0.000045 0.000097 | ||
| 97 | 0.000170 0.000164 0.003167 0.000046 0.000082 | ||
| 98 | 0.000172 0.000196 0.002559 0.000043 0.000075 | ||
| 99 | 0.000168 0.000165 0.003006 0.000045 0.000075 | ||
| 100 | 0.000176 0.000160 0.002567 0.000043 0.000075 | ||
| 101 | 0.000167 0.000163 0.002757 0.000045 0.000076 | ||
| 102 | 0.000171 0.000162 0.002802 0.000045 0.000076 | ||
| 103 | 0.000169 0.000162 0.003102 0.000043 0.000072 | ||
| 104 | 0.000167 0.000162 0.002624 0.000043 0.000075 | ||
| 105 | 0.000170 0.000161 0.002589 0.000043 0.000072 | ||
| 106 | 0.000222 0.000253 0.002657 0.000045 0.000075 | ||
| 107 | 0.000172 0.000162 0.002586 0.000044 0.000084 | ||
| 108 | 0.000172 0.000165 0.002933 0.000044 0.000075 | ||
| 109 | 0.000169 0.000192 0.002609 0.000044 0.000074 | ||
| 110 | 0.000194 0.000162 0.003020 0.000045 0.000081 | ||
| 111 | 0.000170 0.000164 0.002908 0.000045 0.000076 | ||
| 112 | 0.000169 0.000163 0.002567 0.000042 0.000073 | ||
| 113 | 0.000167 0.000159 0.003071 0.000042 0.000074 | ||
| 114 | 0.000222 0.000163 0.003175 0.000043 0.000076 | ||
| 115 | 0.000167 0.000160 0.002641 0.000046 0.000099 | ||
| 116 | 0.000171 0.000168 0.002586 0.000057 0.000075 | ||
| 117 | 0.000170 0.000168 0.003148 0.000046 0.000075 | ||
| 118 | 0.000171 0.000159 0.002770 0.000041 0.000074 | ||
| 119 | 0.000173 0.000158 0.002643 0.000055 0.000077 | ||
| 120 | 0.000313 0.000174 0.002920 0.000045 0.000075 | ||
| 121 | 0.000170 0.000163 0.002551 0.000044 0.000072 | ||
| 122 | 0.000173 0.000161 0.002599 0.000045 0.000073 | ||
| 123 | 0.000167 0.000160 0.003505 0.000046 0.000075 | ||
| 124 | 0.000171 0.000161 0.002894 0.000045 0.000074 | ||
| 125 | 0.000171 0.000166 0.002572 0.000042 0.000073 | ||
| 126 | 0.000166 0.000160 0.004099 0.000044 0.000102 | ||
| 127 | 0.000181 0.000160 0.002499 0.000046 0.000071 | ||
| 128 | 0.000174 0.000175 0.002560 0.000043 0.000068 | ||
| 129 | 0.000165 0.000168 0.003083 0.000044 0.000070 | ||
| 130 | 0.000210 0.000163 0.002535 0.000040 0.000068 | ||
| 131 | 0.000164 0.000177 0.002906 0.000044 0.000075 | ||
| 132 | 0.000175 0.000227 0.002971 0.000043 0.000073 | ||
| 133 | 0.000167 0.000175 0.003409 0.000046 0.000078 | ||
| 134 | 0.000172 0.000166 0.002640 0.000046 0.000074 | ||
| 135 | 0.000177 0.000164 0.002574 0.000046 0.000076 | ||
| 136 | 0.000170 0.000163 0.002631 0.000046 0.000075 | ||
| 137 | 0.000216 0.000168 0.002596 0.000046 0.000076 | ||
| 138 | 0.000170 0.000163 0.002659 0.000045 0.000074 | ||
| 139 | 0.000172 0.000162 0.002677 0.000046 0.000075 | ||
| 140 | 0.000170 0.000159 0.002604 0.000044 0.000081 | ||
| 141 | 0.000171 0.000161 0.003163 0.000046 0.000076 | ||
| 142 | 0.000171 0.000162 0.002574 0.000313 0.000075 | ||
| 143 | 0.000170 0.000186 0.002988 0.000046 0.000074 | ||
| 144 | 0.000171 0.000162 0.002596 0.000043 0.000077 | ||
| 145 | 0.000168 0.000160 0.002640 0.000055 0.000074 | ||
| 146 | 0.000169 0.000161 0.002567 0.000043 0.000371 | ||
| 147 | 0.000170 0.000162 0.002704 0.000057 0.000078 | ||
| 148 | 0.000255 0.000185 0.002453 0.000293 0.000066 | ||
| 149 | 0.000148 0.000143 0.002169 0.000037 0.000066 | ||
| 150 | 0.000173 0.000141 0.002238 0.000039 0.000085 | ||
| 151 | 0.000154 0.000174 0.002679 0.000041 0.000065 | ||
| 152 | 0.000149 0.000144 0.002187 0.000037 0.000065 | ||
| 153 | 0.000146 0.000140 0.002760 0.000039 0.000071 | ||
| 154 | 0.000147 0.000151 0.002193 0.000039 0.000065 | ||
| 155 | 0.000150 0.000172 0.002207 0.000039 0.000067 | ||
| 156 | 0.000147 0.000141 0.002126 0.000037 0.000060 | ||
| 157 | 0.000191 0.000141 0.002119 0.000036 0.000086 | ||
| 158 | 0.000149 0.000144 0.002440 0.000039 0.000065 | ||
| 159 | 0.000148 0.000143 0.003287 0.000041 0.000068 | ||
| 160 | 0.000152 0.000149 0.002555 0.000040 0.000069 | ||
| 161 | 0.000148 0.000141 0.002203 0.000038 0.000065 | ||
| 162 | 0.000147 0.000139 0.002371 0.000052 0.000075 | ||
| 163 | 0.000148 0.000143 0.002201 0.000037 0.000066 | ||
| 164 | 0.000149 0.000140 0.002186 0.000038 0.000062 | ||
| 165 | 0.000152 0.000154 0.002215 0.000038 0.000062 | ||
| 166 | 0.000149 0.000144 0.002505 0.000039 0.000067 | ||
| 167 | 0.000148 0.000140 0.002216 0.000038 0.000101 | ||
| 168 | 0.000160 0.000144 0.002574 0.000039 0.000067 | ||
| 169 | 0.000150 0.000144 0.002266 0.000040 0.000068 | ||
| 170 | 0.000151 0.000142 0.003640 0.000040 0.000068 | ||
| 171 | 0.000150 0.000142 0.002207 0.000038 0.000066 | ||
| 172 | 0.000148 0.000140 0.002337 0.000041 0.000068 | ||
| 173 | 0.000151 0.000144 0.002138 0.000038 0.000063 | ||
| 174 | 0.000146 0.000178 0.002369 0.000039 0.000060 | ||
| 175 | 0.000150 0.000141 0.002290 0.000039 0.000067 | ||
| 176 | 0.000149 0.000143 0.002569 0.000050 0.000070 | ||
| 177 | 0.000149 0.000143 0.002797 0.000040 0.000068 | ||
| 178 | 0.000149 0.000143 0.002720 0.000039 0.000066 | ||
| 179 | 0.000273 0.000154 0.002255 0.000039 0.000066 | ||
| 180 | 0.000147 0.000141 0.002180 0.000037 0.000065 | ||
| 181 | 0.000884 0.000142 0.002164 0.000036 0.000060 | ||
| 182 | 0.000188 0.000143 0.002248 0.000039 0.000062 | ||
| 183 | 0.000148 0.000142 0.002178 0.000038 0.000064 | ||
| 184 | 0.000151 0.000140 0.002705 0.000038 0.000063 | ||
| 185 | 0.000145 0.000144 0.002588 0.000039 0.000064 | ||
| 186 | 0.000147 0.000142 0.002196 0.000037 0.000064 | ||
| 187 | 0.000147 0.000139 0.002169 0.000035 0.000060 | ||
| 188 | 0.000151 0.000894 0.002267 0.000039 0.000061 | ||
| 189 | 0.000152 0.000145 0.002178 0.000038 0.000061 | ||
| 190 | 0.000185 0.000142 0.002148 0.000036 0.000062 | ||
| 191 | 0.000147 0.000141 0.002845 0.000040 0.000065 | ||
| 192 | 0.000159 0.000178 0.002193 0.000039 0.000063 | ||
| 193 | 0.000145 0.000141 0.002571 0.000039 0.000066 | ||
| 194 | 0.000149 0.000141 0.003380 0.000038 0.000065 | ||
| 195 | 0.000200 0.000149 0.002439 0.000039 0.000066 | ||
| 196 | 0.000152 0.000140 0.002193 0.000037 0.000065 | ||
| 197 | 0.000147 0.000139 0.002239 0.000037 0.000066 | ||
| 198 | 0.000200 0.000143 0.002190 0.000039 0.000066 | ||
| 199 | 0.000147 0.000139 0.002243 0.000038 0.000062 | ||
| 200 | 0.000421 0.000144 0.002229 0.000038 0.000062 | ||
| 201 | 0.000147 0.000149 0.002715 0.000038 0.000063 | ||
| 202 | 0.000151 0.000176 0.002144 0.000036 0.000060 | ||
| 203 | 0.000145 0.000138 0.002184 0.000038 0.000064 | ||
| 204 | 0.000146 0.000207 0.002526 0.000040 0.000067 | ||
| 205 | 0.000163 0.000142 0.002366 0.000038 0.000070 | ||
| 206 | 0.000149 0.000143 0.002143 0.000038 0.000065 | ||
| 207 | 0.000150 0.000142 0.002146 0.000035 0.000059 | ||
| 208 | 0.000162 0.000147 0.002736 0.000038 0.000067 | ||
| 209 | 0.000149 0.000146 0.002383 0.000040 0.000071 | ||
| 210 | 0.000147 0.000139 0.002485 0.000038 0.000065 | ||
| 211 | 0.000147 0.000143 0.002811 0.000039 0.000098 | ||
| 212 | 0.000181 0.000142 0.002503 0.000039 0.000066 | ||
| 213 | 0.000150 0.000143 0.002227 0.000039 0.000065 | ||
| 214 | 0.000149 0.000143 0.002182 0.000036 0.000061 | ||
| 215 | 0.000148 0.000387 0.002159 0.000036 0.000059 | ||
| 216 | 0.000147 0.000173 0.002267 0.000039 0.000063 | ||
| 217 | 0.000147 0.000143 0.002729 0.000039 0.000066 | ||
| 218 | 0.000149 0.000142 0.002574 0.000040 0.000069 | ||
| 219 | 0.000149 0.000143 0.002560 0.000040 0.000068 | ||
| 220 | 0.000152 0.000141 0.002203 0.000038 0.000066 | ||
| 221 | 0.000151 0.000139 0.002234 0.000038 0.000087 | ||
| 222 | 0.000148 0.000140 0.002152 0.000036 0.000060 | ||
| 223 | 0.000185 0.000140 0.002274 0.000039 0.000063 | ||
| 224 | 0.000148 0.000144 0.002211 0.000038 0.000066 | ||
| 225 | 0.000149 0.000141 0.002692 0.000039 0.000066 | ||
| 226 | 0.000148 0.000145 0.002519 0.000039 0.000066 | ||
| 227 | 0.000147 0.000143 0.002188 0.000038 0.000066 | ||
| 228 | 0.000149 0.000171 0.002171 0.000038 0.000093 | ||
| 229 | 0.000150 0.000182 0.002185 0.000038 0.000068 | ||
| 230 | 0.000191 0.000154 0.002172 0.000037 0.000061 | ||
| 231 | 0.000145 0.000140 0.002253 0.000043 0.000065 | ||
| 232 | 0.000147 0.000139 0.002673 0.000038 0.000066 | ||
| 233 | 0.000191 0.000144 0.002740 0.000038 0.000066 | ||
| 234 | 0.000147 0.000142 0.002187 0.000038 0.000064 | ||
| 235 | 0.000146 0.000181 0.002180 0.000038 0.000066 | ||
| 236 | 0.000176 0.000142 0.002152 0.000039 0.000061 | ||
| 237 | 0.000149 0.000142 0.002164 0.000037 0.000064 | ||
| 238 | 0.000245 0.000150 0.002771 0.000055 0.000084 | ||
| 239 | 0.000149 0.000145 0.003006 0.000040 0.000069 | ||
| 240 | 0.000153 0.000144 0.002701 0.000040 0.000067 | ||
| 241 | 0.000149 0.000144 0.002192 0.000038 0.000065 | ||
| 242 | 0.000148 0.000143 0.002220 0.000038 0.000063 | ||
| 243 | 0.000146 0.000140 0.002210 0.000038 0.000062 | ||
| 244 | 0.000157 0.000144 0.002174 0.000038 0.000060 | ||
| 245 | 0.000148 0.000171 0.002208 0.000039 0.000061 | ||
| 246 | 0.000146 0.000141 0.002685 0.000039 0.000064 | ||
| 247 | 0.000146 0.000139 0.002811 0.000038 0.000064 | ||
| 248 | 0.000147 0.000140 0.002234 0.000037 0.000063 | ||
| 249 | 0.000143 0.000143 0.002209 0.000040 0.000066 | ||
| 250 | 0.000149 0.000144 0.002162 0.000037 0.000091 | ||
| 251 | 0.000408 0.000141 0.002140 0.000036 0.000060 | ||
| 252 | 0.000142 0.000149 0.002208 0.000132 0.000061 | ||
| 253 | 0.000148 0.000142 0.002706 0.000040 0.000066 | ||
| 254 | 0.000148 0.000142 0.002502 0.000039 0.000065 | ||
| 255 | 0.000176 0.000144 0.002265 0.000039 0.000066 | ||
| 256 | 0.000150 0.000142 0.002199 0.000039 0.000065 | ||
| 257 | 0.000147 0.000154 0.002201 0.000040 0.000067 | ||
| 258 | 0.000150 0.000142 0.002164 0.000036 0.000094 | ||
| 259 | 0.000183 0.000177 0.002253 0.000039 0.000063 | ||
| 260 | 0.000189 0.000143 0.002480 0.000039 0.000066 | ||
| 261 | 0.000148 0.000141 0.002212 0.000037 0.000064 | ||
| 262 | 0.000150 0.000137 0.002192 0.000037 0.000065 | ||
| 263 | 0.000144 0.000140 0.002271 0.000039 0.000062 | ||
| 264 | 0.000190 0.000171 0.002145 0.000037 0.000061 | ||
| 265 | 0.000146 0.000141 0.005865 0.000099 0.000083 | ||
| 266 | 0.000178 0.000165 0.002792 0.000040 0.000066 | ||
| 267 | 0.000148 0.000233 0.002742 0.000039 0.000079 | ||
| 268 | 0.000157 0.000151 0.002225 0.000039 0.000066 | ||
| 269 | 0.000149 0.000142 0.002215 0.000039 0.000081 | ||
| 270 | 0.000165 0.000141 0.002239 0.000039 0.000081 | ||
| 271 | 0.000150 0.000154 0.002154 0.000036 0.000060 | ||
| 272 | 0.000152 0.000151 0.002216 0.000039 0.000075 | ||
| 273 | 0.000172 0.000141 0.004471 0.000060 0.000092 | ||
| 274 | 0.000250 0.000210 0.002881 0.000040 0.000066 | ||
| 275 | 0.000176 0.000152 0.002262 0.000038 0.000337 | ||
| 276 | 0.000164 0.000154 0.002485 0.000039 0.000074 | ||
| 277 | 0.000149 0.000180 0.002148 0.000039 0.000078 | ||
| 278 | 0.000194 0.000145 0.002345 0.000044 0.000064 | ||
| 279 | 0.000164 0.000201 0.002483 0.000040 0.000062 | ||
| 280 | 0.000148 0.000140 0.002249 0.000038 0.000076 | ||
| 281 | 0.000155 0.000144 0.002504 0.000039 0.000067 | ||
| 282 | 0.000166 0.000150 0.002780 0.000040 0.000079 | ||
| 283 | 0.000150 0.000142 0.002194 0.000038 0.000086 | ||
| 284 | 0.000178 0.000153 0.002360 0.000039 0.000079 | ||
| 285 | 0.000160 0.000154 0.002159 0.000036 0.000079 | ||
| 286 | 0.000195 0.000445 0.002203 0.000038 0.000074 | ||
| 287 | 0.000171 0.000161 0.002220 0.000038 0.000087 | ||
| 288 | 0.000165 0.000151 0.002231 0.000038 0.000088 | ||
| 289 | 0.000149 0.000141 0.003445 0.000040 0.000068 | ||
| 290 | 0.000148 0.000143 0.002465 0.000039 0.000081 | ||
| 291 | 0.000165 0.000150 0.002228 0.000038 0.000067 | ||
| 292 | 0.000160 0.000142 0.003231 0.000039 0.000066 | ||
| 293 | 0.000149 0.000141 0.002215 0.000038 0.000078 | ||
| 294 | 0.000146 0.000152 0.002152 0.000038 0.000077 | ||
| 295 | 0.000168 0.000140 0.002258 0.000040 0.000076 | ||
| 296 | 0.000193 0.000142 0.002266 0.000039 0.000085 | ||
| 297 | 0.000261 0.000164 0.002160 0.000037 0.000061 | ||
| 298 | 0.000151 0.000419 0.002217 0.000037 0.000073 | ||
| 299 | 0.000163 0.000148 0.002856 0.000038 0.000106 | ||
| 300 | 0.000258 0.000204 0.002267 0.000040 0.000075 | ||
| 301 | 0.000178 0.000159 0.002266 0.000038 0.000070 | ||
| 302 | 0.000158 0.000149 0.002665 0.000039 0.000085 | ||
| 303 | 0.000164 0.000154 0.002478 0.000039 0.000077 | ||
| 304 | 0.000148 0.000140 0.002459 0.000038 0.000066 | ||
| 305 | 0.000161 0.000142 0.002206 0.000038 0.000074 | ||
| 306 | 0.000155 0.000151 0.002230 0.000039 0.000083 | ||
| 307 | 0.000161 0.000142 0.002225 0.000037 0.000072 | ||
| 308 | 0.000161 0.000187 0.002450 0.000038 0.000063 | ||
| 309 | 0.000145 0.000155 0.002438 0.000039 0.000079 | ||
| 310 | 0.000166 0.000138 0.002296 0.000039 0.000076 | ||
| 311 | 0.000170 0.000156 0.002446 0.000038 0.000078 | ||
| 312 | 0.000160 0.000159 0.002211 0.000038 0.000078 | ||
| 313 | 0.000159 0.000142 0.002190 0.000036 0.000110 | ||
| 314 | 0.000157 0.000150 0.002336 0.000039 0.000073 | ||
| 315 | 0.000165 0.000182 0.002132 0.000038 0.000072 | ||
| 316 | 0.000160 0.000140 0.002641 0.000066 0.000066 | ||
| 317 | 0.000147 0.000153 0.002153 0.000039 0.000080 | ||
| 318 | 0.000148 0.000156 0.002165 0.000037 0.000077 | ||
| 319 | 0.000147 0.000151 0.002201 0.000038 0.000067 | ||
| 320 | 0.000162 0.000143 0.002216 0.000040 0.000080 | ||
| 321 | 0.000165 0.000148 0.002223 0.000055 0.000080 | ||
| 322 | 0.000193 0.000143 0.002155 0.000037 0.000078 | ||
| 323 | 0.000165 0.000143 0.003005 0.000040 0.000067 | ||
| 324 | 0.000151 0.000145 0.002511 0.000039 0.000070 | ||
| 325 | 0.000149 0.000173 0.002246 0.000039 0.000066 | ||
| 326 | 0.000148 0.000143 0.002808 0.000040 0.000067 | ||
| 327 | 0.000148 0.000142 0.002513 0.000038 0.000066 | ||
| 328 | 0.000148 0.000143 0.002203 0.000037 0.000065 | ||
| 329 | 0.000146 0.000138 0.002123 0.000038 0.000061 | ||
| 330 | 0.000170 0.000149 0.002165 0.000036 0.000062 | ||
| 331 | 0.000144 0.000145 0.002186 0.000037 0.000059 | ||
| 332 | 0.000144 0.000139 0.002520 0.000037 0.000065 | ||
| 333 | 0.000146 0.000139 0.002559 0.000038 0.000066 | ||
| 334 | 0.000153 0.000142 0.002537 0.000038 0.000067 | ||
| 335 | 0.000168 0.000144 0.002217 0.000048 0.000066 | ||
| 336 | 0.000147 0.000141 0.002120 0.000037 0.000063 | ||
| 337 | 0.000188 0.001725 0.002541 0.000040 0.000067 | ||
| 338 | 0.000149 0.000143 0.002229 0.000038 0.000076 | ||
| 339 | 0.000147 0.000143 0.002233 0.000037 0.000062 | ||
| 340 | 0.000182 0.000142 0.002150 0.000037 0.000061 | ||
| 341 | 0.000148 0.000140 0.002196 0.000037 0.000065 | ||
| 342 | 0.000145 0.000140 0.002473 0.000037 0.000065 | ||
| 343 | 0.000147 0.000139 0.002725 0.000040 0.000067 | ||
| 344 | 0.000149 0.000142 0.002217 0.000039 0.000065 | ||
| 345 | 0.000146 0.000140 0.002167 0.000037 0.000061 | ||
| 346 | 0.000176 0.000144 0.002415 0.000039 0.000064 | ||
| 347 | 0.000171 0.000144 0.002925 0.000040 0.000068 | ||
| 348 | 0.000152 0.000167 0.002190 0.000039 0.000066 | ||
| 349 | 0.000149 0.000142 0.002530 0.000039 0.000067 | ||
| 350 | 0.000150 0.000142 0.003059 0.000040 0.000068 | ||
| 351 | 0.000149 0.000142 0.002417 0.000038 0.000072 | ||
| 352 | 0.000149 0.000143 0.002569 0.000038 0.000068 | ||
| 353 | 0.000148 0.000141 0.002262 0.000040 0.000068 | ||
| 354 | 0.000152 0.000144 0.002253 0.000038 0.000066 | ||
| 355 | 0.000149 0.000142 0.002134 0.000037 0.000061 | ||
| 356 | 0.000277 0.000427 0.002186 0.000036 0.000060 | ||
| 357 | 0.000145 0.000139 0.002791 0.000039 0.000065 | ||
| 358 | 0.000149 0.000144 0.002238 0.000039 0.000066 | ||
| 359 | 0.000147 0.000144 0.002514 0.000039 0.000066 | ||
| 360 | 0.000148 0.000143 0.002683 0.000038 0.000063 | ||
| 361 | 0.000147 0.000139 0.002214 0.000037 0.000068 | ||
| 362 | 0.000145 0.000139 0.002149 0.000036 0.000059 | ||
| 363 | 0.000185 0.000139 0.002214 0.000037 0.000060 | ||
| 364 | 0.000145 0.000140 0.003549 0.000039 0.000066 | ||
| 365 | 0.000187 0.000142 0.002160 0.000037 0.000059 | ||
| 366 | 0.000147 0.000158 0.002212 0.000038 0.000065 | ||
| 367 | 0.000148 0.000140 0.002483 0.000039 0.000067 | ||
| 368 | 0.000147 0.000142 0.003034 0.000039 0.000066 | ||
| 369 | 0.000148 0.000142 0.002228 0.000039 0.000066 | ||
| 370 | 0.000145 0.000151 0.002225 0.000040 0.000067 | ||
| 371 | 0.000149 0.000142 0.002858 0.000048 0.000083 | ||
| 372 | 0.000203 0.000185 0.004022 0.000049 0.000086 | ||
| 373 | 0.000212 0.000188 0.005086 0.000056 0.000093 | ||
| 374 | 0.000220 0.000203 0.004209 0.000051 0.000085 | ||
| 375 | 0.000208 0.000247 0.009261 0.000098 0.000089 | ||
| 376 | 0.000211 0.000262 0.002546 0.000041 0.000066 | ||
| 377 | 0.000198 0.000150 0.002534 0.000039 0.000079 | ||
| 378 | 0.000159 0.000143 0.002207 0.000038 0.000094 | ||
| 379 | 0.000157 0.000143 0.002173 0.000038 0.000062 | ||
| 380 | 0.000198 0.000505 0.002157 0.000039 0.000079 | ||
| 381 | 0.000164 0.000143 0.002172 0.000038 0.000076 | ||
| 382 | 0.000156 0.000148 0.002259 0.000039 0.000080 | ||
| 383 | 0.000161 0.000142 0.002219 0.000039 0.000076 | ||
| 384 | 0.000161 0.000143 0.002266 0.000039 0.000085 | ||
| 385 | 0.000161 0.000141 0.002150 0.000036 0.000077 | ||
| 386 | 0.000179 0.000140 0.002140 0.000036 0.000071 | ||
| 387 | 0.000157 0.000151 0.002316 0.000040 0.000079 | ||
| 388 | 0.000149 0.000143 0.002269 0.000039 0.000066 | ||
| 389 | 0.000161 0.000142 0.002206 0.000040 0.000091 | ||
| 390 | 0.000172 0.000143 0.002244 0.000039 0.000067 | ||
| 391 | 0.000168 0.000142 0.002189 0.000039 0.000083 | ||
| 392 | 0.000163 0.000188 0.002156 0.000037 0.000077 | ||
| 393 | 0.000168 0.000143 0.002266 0.000039 0.000084 | ||
| 394 | 0.000166 0.000147 0.002205 0.000325 0.000078 | ||
| 395 | 0.000175 0.000140 0.002173 0.000037 0.000106 | ||
| 396 | 0.000170 0.000153 0.002158 0.000036 0.000083 | ||
| 397 | 0.000168 0.000147 0.002825 0.000039 0.000108 | ||
| 398 | 0.000172 0.000151 0.002483 0.000038 0.000085 | ||
| 399 | 0.000160 0.000143 0.002163 0.000038 0.000066 | ||
| 400 | 0.000161 0.000154 0.002493 0.000039 0.000084 | ||
| 401 | 0.000167 0.000153 0.002564 0.000040 0.000082 | ||
| 402 | 0.000159 0.000151 0.002185 0.000046 0.000088 | ||
| 403 | 0.000157 0.000156 0.002175 0.000039 0.000076 | ||
| 404 | 0.000150 0.000144 0.002151 0.000038 0.000063 | ||
| 405 | 0.000160 0.000140 0.002429 0.000038 0.000064 | ||
| 406 | 0.000160 0.000154 0.002184 0.000048 0.000077 | ||
| 407 | 0.000168 0.000142 0.002686 0.000040 0.000119 | ||
| 408 | 0.000164 0.000152 0.002279 0.000039 0.000075 | ||
| 409 | 0.000161 0.000143 0.002192 0.000068 0.000067 | ||
| 410 | 0.000161 0.000154 0.002190 0.000040 0.000092 | ||
| 411 | 0.000246 0.000146 0.003064 0.000038 0.000072 | ||
| 412 | 0.000163 0.000158 0.002171 0.000037 0.000073 | ||
| 413 | 0.000216 0.000144 0.002209 0.000039 0.000115 | ||
| 414 | 0.000159 0.000141 0.003338 0.000039 0.000079 | ||
| 415 | 0.000277 0.000158 0.002464 0.000039 0.000082 | ||
| 416 | 0.000168 0.000150 0.002227 0.000037 0.000079 | ||
| 417 | 0.000168 0.000146 0.002775 0.000038 0.000077 | ||
| 418 | 0.000146 0.000147 0.002694 0.000042 0.000084 | ||
| 419 | 0.000160 0.000145 0.002807 0.000039 0.000066 | ||
| 420 | 0.000162 0.000177 0.002187 0.000063 0.000066 | ||
| 421 | 0.000147 0.000141 0.002220 0.000038 0.000085 | ||
| 422 | 0.000160 0.000142 0.002216 0.000037 0.000077 | ||
| 423 | 0.000166 0.000159 0.002224 0.000039 0.000108 | ||
| 424 | 0.000147 0.000141 0.002746 0.000039 0.000078 | ||
| 425 | 0.000159 0.000141 0.002194 0.000037 0.000063 | ||
| 426 | 0.000164 0.000143 0.002164 0.000039 0.000067 | ||
| 427 | 0.000169 0.000152 0.002278 0.000074 0.000088 | ||
| 428 | 0.000157 0.000157 0.002155 0.000068 0.000076 | ||
| 429 | 0.000159 0.000140 0.002170 0.000035 0.000078 | ||
| 430 | 0.000156 0.000141 0.002299 0.000040 0.000066 | ||
| 431 | 0.000192 0.000160 0.002241 0.000039 0.000082 | ||
| 432 | 0.000149 0.000143 0.002288 0.000039 0.000079 | ||
| 433 | 0.000161 0.000142 0.002185 0.000049 0.000077 | ||
| 434 | 0.000147 0.000149 0.002284 0.000039 0.000063 | ||
| 435 | 0.000456 0.000144 0.002203 0.000046 0.000064 | ||
| 436 | 0.000187 0.000144 0.002147 0.000037 0.000061 | ||
| 437 | 0.000147 0.000140 0.002238 0.000040 0.000067 | ||
| 438 | 0.000147 0.000140 0.003077 0.000041 0.000068 | ||
| 439 | 0.000151 0.000142 0.002226 0.000038 0.000065 | ||
| 440 | 0.000146 0.000142 0.002188 0.000039 0.000065 | ||
| 441 | 0.000145 0.000141 0.002156 0.000036 0.000061 | ||
| 442 | 0.000143 0.000172 0.002379 0.000037 0.000060 | ||
| 443 | 0.000152 0.000231 0.002172 0.000038 0.000065 | ||
| 444 | 0.000153 0.000142 0.002181 0.000039 0.000065 | ||
| 445 | 0.000148 0.000142 0.002567 0.000039 0.000067 | ||
| 446 | 0.000150 0.000142 0.002177 0.000038 0.000072 | ||
| 447 | 0.000147 0.000146 0.002328 0.000038 0.000063 | ||
| 448 | 0.000146 0.000150 0.002211 0.000038 0.000063 | ||
| 449 | 0.000149 0.000143 0.002222 0.000040 0.000072 | ||
| 450 | 0.000150 0.000144 0.002455 0.000039 0.000065 | ||
| 451 | 0.000147 0.000144 0.002206 0.000039 0.000066 | ||
| 452 | 0.000145 0.000141 0.002153 0.000055 0.000070 | ||
| 453 | 0.000443 0.000144 0.002139 0.000036 0.000069 | ||
| 454 | 0.000147 0.000182 0.002188 0.000037 0.000061 | ||
| 455 | 0.000146 0.000138 0.002248 0.000038 0.000067 | ||
| 456 | 0.000147 0.000142 0.002817 0.000039 0.000067 | ||
| 457 | 0.000148 0.000144 0.002230 0.000038 0.000066 | ||
| 458 | 0.000148 0.000142 0.002239 0.000039 0.000067 | ||
| 459 | 0.000149 0.000142 0.002197 0.000038 0.000063 | ||
| 460 | 0.000181 0.000674 0.002170 0.000038 0.000061 | ||
| 461 | 0.000146 0.000195 0.002204 0.000037 0.000061 | ||
| 462 | 0.000146 0.000141 0.002260 0.000039 0.000067 | ||
| 463 | 0.000150 0.000142 0.002193 0.000045 0.000065 | ||
| 464 | 0.000147 0.000140 0.002229 0.000036 0.000066 | ||
| 465 | 0.000146 0.000137 0.002197 0.000037 0.000062 | ||
| 466 | 0.000152 0.000159 0.002187 0.000036 0.000060 | ||
| 467 | 0.000145 0.000139 0.002224 0.000037 0.000064 | ||
| 468 | 0.000149 0.000144 0.002175 0.000038 0.000066 | ||
| 469 | 0.000150 0.000143 0.002187 0.000038 0.000066 | ||
| 470 | 0.000148 0.000141 0.002152 0.000036 0.000061 | ||
| 471 | 0.000185 0.000141 0.002176 0.000036 0.000064 | ||
| 472 | 0.000169 0.000145 0.002483 0.000038 0.000067 | ||
| 473 | 0.000149 0.000141 0.002225 0.000036 0.000064 | ||
| 474 | 0.000244 0.000149 0.002538 0.000038 0.000065 | ||
| 475 | 0.000156 0.000143 0.002317 0.000039 0.000297 | ||
| 476 | 0.000228 0.000172 0.002222 0.000039 0.000300 | ||
| 477 | 0.000149 0.000145 0.002173 0.000040 0.000066 | ||
| 478 | 0.000154 0.000145 0.002155 0.000038 0.000093 | ||
| 479 | 0.000161 0.000145 0.002178 0.000039 0.000063 | ||
| 480 | 0.000147 0.000170 0.002299 0.000039 0.000066 | ||
| 481 | 0.000149 0.000142 0.003494 0.000040 0.000066 | ||
| 482 | 0.000149 0.000178 0.002237 0.000038 0.000062 | ||
| 483 | 0.000148 0.000143 0.002150 0.000037 0.000064 | ||
| 484 | 0.000146 0.000139 0.002315 0.000038 0.000065 | ||
| 485 | 0.000147 0.000141 0.002269 0.000039 0.000067 | ||
| 486 | 0.000173 0.000145 0.002191 0.000037 0.000065 | ||
| 487 | 0.000166 0.000144 0.002247 0.000038 0.000061 | ||
| 488 | 0.000146 0.000140 0.002551 0.000038 0.000065 | ||
| 489 | 0.000148 0.000175 0.002202 0.000037 0.000064 | ||
| 490 | 0.000145 0.000141 0.002217 0.000038 0.000063 | ||
| 491 | 0.000146 0.000138 0.002164 0.000132 0.000547 | ||
| 492 | 0.000148 0.000144 0.008140 0.000160 0.000893 | ||
| 493 | 0.000311 0.000221 0.004526 0.000058 0.000109 | ||
| 494 | 0.000238 0.000225 0.003475 0.000044 0.000094 | ||
| 495 | 0.000178 0.000177 0.002537 0.000041 0.000087 | ||
| 496 | 0.000172 0.000161 0.002194 0.000048 0.000084 | ||
| 497 | 0.000172 0.000163 0.002177 0.000040 0.000084 | ||
| 498 | 0.001177 0.000156 0.002351 0.000041 0.000325 | ||
| 499 | 0.000167 0.000163 0.002273 0.000040 0.000088 | ||
| 500 | 0.000170 0.000151 0.002245 0.000040 0.000077 | ||
| 501 | 0.000172 0.000896 0.002181 0.000038 0.000080 | ||
| 502 | 0.000202 0.000164 0.002449 0.000038 0.000076 | ||
| 503 | 0.000162 0.000161 0.002188 0.000037 0.000078 | ||
| 504 | 0.000165 0.000154 0.002440 0.000074 0.000091 | ||
| 505 | 0.000167 0.000149 0.002185 0.000039 0.000081 | ||
| 506 | 0.000176 0.000154 0.002427 0.000040 0.000093 | ||
| 507 | 0.000168 0.000154 0.002304 0.000038 0.000105 | ||
| 508 | 0.000672 0.000160 0.002260 0.000038 0.000088 | ||
| 509 | 0.000686 0.000159 0.002207 0.000038 0.000084 | ||
| 510 | 0.000163 0.000154 0.002186 0.000037 0.000077 | ||
| 511 | 0.000173 0.000153 0.002399 0.000038 0.000082 | ||
| 512 | 0.000166 0.000157 0.002709 0.000039 0.000077 | ||
| 513 | 0.000155 0.000149 0.002143 0.000038 0.000097 | ||
| 514 | 0.000166 0.000154 0.003454 0.000051 0.000106 | ||
| 515 | 0.000166 0.000160 0.002539 0.000039 0.000128 | ||
| 516 | 0.000169 0.000149 0.002307 0.000039 0.000085 | ||
| 517 | 0.000170 0.000158 0.002225 0.000040 0.000088 | ||
| 518 | 0.000170 0.000180 0.002165 0.000036 0.000103 | ||
| 519 | 0.000203 0.000160 0.002345 0.000039 0.000075 | ||
| 520 | 0.000173 0.000191 0.002160 0.000038 0.000074 | ||
| 521 | 0.000165 0.000156 0.002243 0.000039 0.000085 | ||
| 522 | 0.000172 0.000154 0.002260 0.000040 0.000090 | ||
| 523 | 0.000163 0.000164 0.002258 0.000040 0.000085 | ||
| 524 | 0.000168 0.000143 0.002755 0.000039 0.000086 | ||
| 525 | 0.000178 0.000155 0.002202 0.000039 0.000075 | ||
| 526 | 0.000164 0.000153 0.002267 0.000038 0.000081 | ||
| 527 | 0.000161 0.000154 0.002158 0.000036 0.000090 | ||
| 528 | 0.000169 0.000158 0.002454 0.000037 0.000061 | ||
| 529 | 0.000162 0.000154 0.002543 0.000038 0.000091 | ||
| 530 | 0.000170 0.000154 0.002168 0.000037 0.000085 | ||
| 531 | 0.000166 0.000151 0.002852 0.000038 0.000087 | ||
| 532 | 0.000167 0.000165 0.002484 0.000039 0.000089 | ||
| 533 | 0.000374 0.000197 0.002217 0.000038 0.000082 | ||
| 534 | 0.000156 0.000150 0.002213 0.000038 0.000112 | ||
| 535 | 0.000683 0.000155 0.002131 0.000038 0.000077 | ||
| 536 | 0.000162 0.000164 0.002199 0.000038 0.000076 | ||
| 537 | 0.000176 0.000154 0.002345 0.000038 0.000089 | ||
| 538 | 0.000175 0.000150 0.002928 0.000039 0.000082 | ||
| 539 | 0.000161 0.000140 0.002528 0.000039 0.000066 | ||
| 540 | 0.000159 0.000151 0.002256 0.000039 0.000075 | ||
| 541 | 0.000155 0.000156 0.002233 0.000040 0.000066 | ||
| 542 | 0.000171 0.000156 0.002149 0.000066 0.000084 | ||
| 543 | 0.000182 0.000154 0.002233 0.000037 0.000117 | ||
| 544 | 0.000166 0.000160 0.002460 0.000037 0.000088 | ||
| 545 | 0.000159 0.000165 0.002891 0.000043 0.000075 | ||
| 546 | 0.000169 0.000143 0.002383 0.000038 0.000084 | ||
| 547 | 0.000162 0.000149 0.002313 0.000039 0.000078 | ||
| 548 | 0.000166 0.000161 0.003837 0.000041 0.000092 | ||
| 549 | 0.000166 0.000144 0.002389 0.000038 0.000078 | ||
| 550 | 0.000185 0.000153 0.002548 0.000040 0.000090 | ||
| 551 | 0.000166 0.000152 0.002943 0.000037 0.000063 | ||
| 552 | 0.000147 0.000140 0.002284 0.000038 0.000066 | ||
| 553 | 0.000145 0.000141 0.002555 0.000038 0.000071 | ||
| 554 | 0.000189 0.000143 0.002235 0.000038 0.000359 | ||
| 555 | 0.000149 0.000140 0.002779 0.000053 0.000089 | ||
| 556 | 0.000211 0.000206 0.002744 0.000040 0.000067 | ||
| 557 | 0.000150 0.000144 0.002471 0.000039 0.000065 | ||
| 558 | 0.000151 0.000140 0.002563 0.000040 0.000064 | ||
| 559 | 0.000148 0.000138 0.002305 0.000039 0.000066 | ||
| 560 | 0.000148 0.000141 0.002162 0.000036 0.000060 | ||
| 561 | 0.000182 0.000145 0.002403 0.000042 0.000063 | ||
| 562 | 0.000152 0.000141 0.002311 0.000039 0.000065 | ||
| 563 | 0.000148 0.000180 0.002192 0.000038 0.000065 | ||
| 564 | 0.000149 0.000141 0.002516 0.000039 0.000066 | ||
| 565 | 0.000147 0.000142 0.002193 0.000040 0.000064 | ||
| 566 | 0.000146 0.000138 0.002194 0.000036 0.000060 | ||
| 567 | 0.000197 0.000142 0.002291 0.000038 0.000063 | ||
| 568 | 0.000148 0.000142 0.002440 0.000039 0.000066 | ||
| 569 | 0.000148 0.000143 0.002228 0.000039 0.000066 | ||
| 570 | 0.000149 0.000140 0.002216 0.000038 0.000067 | ||
| 571 | 0.000148 0.000145 0.002196 0.000038 0.000066 | ||
| 572 | 0.000148 0.000141 0.002157 0.000036 0.000061 | ||
| 573 | 0.000144 0.000175 0.002491 0.000039 0.000063 | ||
| 574 | 0.000147 0.000141 0.002290 0.000039 0.000066 | ||
| 575 | 0.000149 0.000143 0.002508 0.000039 0.000067 | ||
| 576 | 0.000149 0.000142 0.002536 0.000039 0.000067 | ||
| 577 | 0.000150 0.000141 0.003132 0.000046 0.000070 | ||
| 578 | 0.000153 0.000145 0.002202 0.000039 0.000067 | ||
| 579 | 0.000149 0.000143 0.002102 0.000037 0.000067 | ||
| 580 | 0.000989 0.000142 0.002188 0.000063 0.000068 | ||
| 581 | 0.000151 0.000142 0.002229 0.000038 0.000068 | ||
| 582 | 0.001481 0.000141 0.002238 0.000039 0.000070 | ||
| 583 | 0.000148 0.000142 0.002204 0.000037 0.000093 | ||
| 584 | 0.000160 0.000141 0.002138 0.000038 0.000062 | ||
| 585 | 0.000145 0.000141 0.002708 0.000039 0.000065 | ||
| 586 | 0.000147 0.000142 0.002218 0.000039 0.000067 | ||
| 587 | 0.000148 0.000140 0.002759 0.000038 0.000066 | ||
| 588 | 0.000148 0.000139 0.003156 0.000037 0.000067 | ||
| 589 | 0.000185 0.000141 0.002259 0.000040 0.000066 | ||
| 590 | 0.000148 0.000142 0.002226 0.000047 0.000068 | ||
| 591 | 0.000148 0.000142 0.002305 0.000040 0.000090 | ||
| 592 | 0.001000 0.000155 0.002217 0.000064 0.000068 | ||
| 593 | 0.000154 0.000144 0.002554 0.000038 0.000065 | ||
| 594 | 0.000148 0.000141 0.002151 0.000038 0.000066 | ||
| 595 | 0.000146 0.000181 0.003031 0.000039 0.000062 | ||
| 596 | 0.000146 0.000180 0.002254 0.000039 0.000061 | ||
| 597 | 0.000147 0.000143 0.002188 0.000039 0.000065 | ||
| 598 | 0.000147 0.000140 0.002259 0.000039 0.000063 | ||
| 599 | 0.000146 0.000141 0.002238 0.000038 0.000076 | ||
| 600 | 0.000148 0.000141 0.002163 0.000038 0.000061 | ||
| 601 | 0.000153 0.000143 0.002195 0.000043 0.000072 | ||
| 602 | 0.000149 0.000177 0.003291 0.000039 0.000063 | ||
| 603 | 0.000258 0.000153 0.002150 0.000039 0.000066 | ||
| 604 | 0.000157 0.000144 0.002155 0.000037 0.000060 | ||
| 605 | 0.000160 0.001194 0.002269 0.000040 0.000100 | ||
| 606 | 0.000164 0.000151 0.002162 0.000038 0.000078 | ||
| 607 | 0.000163 0.000424 0.002178 0.000036 0.000069 | ||
| 608 | 0.001333 0.000389 0.002249 0.000039 0.000066 | ||
| 609 | 0.000175 0.000142 0.002208 0.000037 0.000102 | ||
| 610 | 0.000443 0.000156 0.002249 0.000040 0.000062 | ||
| 611 | 0.000244 0.001562 0.003049 0.000041 0.000083 | ||
| 612 | 0.000208 0.000183 0.002483 0.000040 0.000068 | ||
| 613 | 0.000164 0.000156 0.002220 0.000040 0.000078 | ||
| 614 | 0.000169 0.000142 0.002694 0.000040 0.000083 | ||
| 615 | 0.000162 0.000152 0.002453 0.000038 0.000077 | ||
| 616 | 0.000157 0.000189 0.002306 0.000040 0.000077 | ||
| 617 | 0.000162 0.000151 0.002200 0.000039 0.000325 | ||
| 618 | 0.000150 0.000142 0.002251 0.000039 0.000066 | ||
| 619 | 0.000172 0.000157 0.002184 0.000039 0.000073 | ||
| 620 | 0.000160 0.000150 0.002678 0.000038 0.000326 | ||
| 621 | 0.000165 0.000151 0.002292 0.000038 0.000094 | ||
| 622 | 0.000162 0.000156 0.002203 0.000037 0.000083 | ||
| 623 | 0.000170 0.000141 0.002175 0.000037 0.000074 | ||
| 624 | 0.000149 0.000166 0.002235 0.000039 0.000071 | ||
| 625 | 0.000161 0.000143 0.002423 0.000036 0.000180 | ||
| 626 | 0.000164 0.000152 0.003095 0.000039 0.000076 | ||
| 627 | 0.000172 0.000153 0.002466 0.000039 0.000115 | ||
| 628 | 0.000151 0.000153 0.002274 0.000039 0.000066 | ||
| 629 | 0.000150 0.000142 0.003179 0.000040 0.000080 | ||
| 630 | 0.000172 0.000159 0.002421 0.000039 0.000083 | ||
| 631 | 0.000159 0.000142 0.002165 0.000037 0.000068 | ||
| 632 | 0.000155 0.000150 0.002233 0.000041 0.000123 | ||
| 633 | 0.000153 0.000158 0.002253 0.000039 0.000571 | ||
| 634 | 0.000203 0.000145 0.002269 0.000041 0.000077 | ||
| 635 | 0.000164 0.000158 0.002176 0.000038 0.000086 | ||
| 636 | 0.000197 0.000144 0.002220 0.000041 0.000080 | ||
| 637 | 0.000174 0.000403 0.002224 0.000039 0.000063 | ||
| 638 | 0.000218 0.000144 0.002150 0.000036 0.000069 | ||
| 639 | 0.000149 0.000141 0.002479 0.000040 0.000079 | ||
| 640 | 0.000163 0.000145 0.002664 0.000039 0.000082 | ||
| 641 | 0.000150 0.000152 0.002446 0.000040 0.000069 | ||
| 642 | 0.000203 0.000154 0.002205 0.000043 0.000077 | ||
| 643 | 0.000160 0.000143 0.002210 0.000039 0.000087 | ||
| 644 | 0.000194 0.000145 0.002167 0.000038 0.000069 | ||
| 645 | 0.000151 0.000154 0.002137 0.000036 0.000079 | ||
| 646 | 0.000162 0.000140 0.002697 0.000037 0.000085 | ||
| 647 | 0.000162 0.000143 0.002233 0.000039 0.000076 | ||
| 648 | 0.000148 0.000144 0.002210 0.000039 0.000065 | ||
| 649 | 0.000151 0.000152 0.003015 0.000041 0.000084 | ||
| 650 | 0.000158 0.000156 0.002730 0.000039 0.000079 | ||
| 651 | 0.000312 0.000165 0.002207 0.000038 0.000076 | ||
| 652 | 0.000167 0.000139 0.002297 0.000040 0.000065 | ||
| 653 | 0.000172 0.000154 0.002205 0.000037 0.000080 | ||
| 654 | 0.000146 0.000149 0.002286 0.000039 0.000076 | ||
| 655 | 0.000164 0.000151 0.002214 0.000038 0.000073 | ||
| 656 | 0.000162 0.000169 0.003110 0.000038 0.000067 | ||
| 657 | 0.000293 0.000144 0.002182 0.000038 0.000060 | ||
| 658 | 0.000157 0.000153 0.003778 0.000049 0.000095 | ||
| 659 | 0.001735 0.000210 0.004360 0.000050 0.000083 | ||
| 660 | 0.000297 0.000198 0.002532 0.000039 0.000072 | ||
| 661 | 0.000185 0.000163 0.002173 0.000039 0.000070 | ||
| 662 | 0.000183 0.000142 0.002122 0.000038 0.000062 | ||
| 663 | 0.000147 0.000145 0.002443 0.000039 0.000066 | ||
| 664 | 0.000149 0.000144 0.002473 0.000040 0.000066 | ||
| 665 | 0.000147 0.000139 0.002949 0.000038 0.000063 | ||
| 666 | 0.000147 0.000139 0.002737 0.000039 0.000066 | ||
| 667 | 0.000199 0.000142 0.002927 0.000038 0.000066 | ||
| 668 | 0.000149 0.000141 0.002188 0.000038 0.000065 | ||
| 669 | 0.000147 0.000144 0.002203 0.000038 0.000066 | ||
| 670 | 0.000149 0.000141 0.002154 0.000037 0.000062 | ||
| 671 | 0.000144 0.000137 0.003526 0.000037 0.000066 | ||
| 672 | 0.000151 0.000153 0.002150 0.000036 0.000060 | ||
| 673 | 0.000145 0.000138 0.002202 0.000037 0.000065 | ||
| 674 | 0.000272 0.000187 0.002477 0.000038 0.000306 | ||
| 675 | 0.000148 0.000141 0.002421 0.000038 0.000067 | ||
| 676 | 0.000147 0.000141 0.002252 0.000039 0.000065 | ||
| 677 | 0.000150 0.000140 0.002144 0.000037 0.000061 | ||
| 678 | 0.000191 0.000144 0.002229 0.000038 0.000060 | ||
| 679 | 0.000145 0.000145 0.002202 0.000038 0.000061 | ||
| 680 | 0.000146 0.000142 0.002418 0.000038 0.000065 | ||
| 681 | 0.000189 0.000171 0.002568 0.000040 0.000066 | ||
| 682 | 0.000150 0.000141 0.002300 0.000039 0.000067 | ||
| 683 | 0.000151 0.000141 0.002199 0.000038 0.000347 | ||
| 684 | 0.000147 0.000140 0.002165 0.000035 0.000061 | ||
| 685 | 0.000151 0.000646 0.002310 0.000040 0.000062 | ||
| 686 | 0.000161 0.000410 0.002195 0.000038 0.000061 | ||
| 687 | 0.000147 0.000141 0.002466 0.000039 0.000066 | ||
| 688 | 0.000147 0.000141 0.003026 0.000038 0.000066 | ||
| 689 | 0.000148 0.000142 0.002223 0.000038 0.000065 | ||
| 690 | 0.000147 0.000142 0.002196 0.000038 0.000067 | ||
| 691 | 0.000147 0.000141 0.002155 0.000044 0.000064 | ||
| 692 | 0.000146 0.000140 0.002354 0.000039 0.000067 | ||
| 693 | 0.000149 0.000143 0.002186 0.000037 0.000062 | ||
| 694 | 0.000150 0.000144 0.002498 0.000040 0.000063 | ||
| 695 | 0.000178 0.000212 0.002453 0.000039 0.000062 | ||
| 696 | 0.000149 0.000177 0.002463 0.000038 0.000063 | ||
| 697 | 0.000147 0.000142 0.002507 0.000038 0.000067 | ||
| 698 | 0.000149 0.000142 0.002717 0.000038 0.000066 | ||
| 699 | 0.000148 0.000141 0.002452 0.000037 0.000065 | ||
| 700 | 0.000147 0.000140 0.002266 0.000039 0.000066 | ||
| 701 | 0.000149 0.000141 0.002183 0.000037 0.000066 | ||
| 702 | 0.000153 0.000142 0.002203 0.000039 0.000067 | ||
| 703 | 0.000152 0.000419 0.002245 0.000040 0.000062 | ||
| 704 | 0.000149 0.000181 0.002181 0.000038 0.000063 | ||
| 705 | 0.000147 0.000142 0.002224 0.000039 0.000066 | ||
| 706 | 0.000147 0.000142 0.002204 0.000038 0.000066 | ||
| 707 | 0.000146 0.000141 0.002250 0.000038 0.000065 | ||
| 708 | 0.000148 0.000141 0.002142 0.000038 0.000063 | ||
| 709 | 0.000156 0.000139 0.002176 0.000036 0.000060 | ||
| 710 | 0.000243 0.000148 0.002768 0.000039 0.000069 | ||
| 711 | 0.000146 0.000204 0.002194 0.000037 0.000065 | ||
| 712 | 0.000147 0.000143 0.003071 0.000039 0.000066 | ||
| 713 | 0.000148 0.000144 0.003489 0.000042 0.000073 | ||
| 714 | 0.000151 0.000151 0.002173 0.000039 0.000064 | ||
| 715 | 0.000146 0.000140 0.003509 0.000038 0.000067 | ||
| 716 | 0.000148 0.000142 0.002191 0.000038 0.000064 | ||
| 717 | 0.000146 0.000139 0.002441 0.000039 0.000117 | ||
| 718 | 0.000174 0.000141 0.002133 0.000038 0.000065 | ||
| 719 | 0.000151 0.000142 0.002257 0.000039 0.000073 | ||
| 720 | 0.000163 0.000147 0.002187 0.000038 0.000061 | ||
| 721 | 0.000146 0.000222 0.002193 0.000038 0.000062 | ||
| 722 | 0.000145 0.000143 0.002434 0.000037 0.000064 | ||
| 723 | 0.000145 0.000139 0.002933 0.000041 0.000066 | ||
| 724 | 0.000146 0.000140 0.002680 0.000037 0.000065 | ||
| 725 | 0.000143 0.000139 0.002217 0.001029 0.000065 | ||
| 726 | 0.000145 0.000139 0.002361 0.000039 0.000067 | ||
| 727 | 0.000150 0.000143 0.002186 0.000068 0.000066 | ||
| 728 | 0.000148 0.000142 0.002149 0.000037 0.000061 | ||
| 729 | 0.000147 0.000181 0.002183 0.000037 0.000061 | ||
| 730 | 0.000146 0.000455 0.002305 0.000038 0.000074 | ||
| 731 | 0.000148 0.000143 0.002223 0.000038 0.000066 | ||
| 732 | 0.000148 0.000141 0.002547 0.000038 0.000066 | ||
| 733 | 0.000148 0.000143 0.002180 0.000038 0.000336 | ||
| 734 | 0.000146 0.000141 0.002102 0.000037 0.000063 | ||
| 735 | 0.000150 0.000145 0.002170 0.000037 0.000067 | ||
| 736 | 0.000152 0.000138 0.002982 0.000038 0.000067 | ||
| 737 | 0.000149 0.000143 0.002419 0.000037 0.000064 | ||
| 738 | 0.000145 0.000195 0.002228 0.000040 0.000067 | ||
| 739 | 0.000148 0.000143 0.002193 0.000038 0.000064 | ||
| 740 | 0.000155 0.000141 0.002166 0.000067 0.000066 | ||
| 741 | 0.000454 0.000176 0.002193 0.000038 0.000063 | ||
| 742 | 0.000186 0.000142 0.002165 0.000035 0.000066 | ||
| 743 | 0.000144 0.000138 0.002542 0.000038 0.000066 | ||
| 744 | 0.000148 0.000143 0.002733 0.000039 0.000066 | ||
| 745 | 0.000147 0.000141 0.002227 0.000038 0.000067 | ||
| 746 | 0.000145 0.000142 0.002764 0.000037 0.000064 | ||
| 747 | 0.000144 0.000138 0.002207 0.000037 0.000065 | ||
| 748 | 0.000147 0.000185 0.002262 0.000038 0.000062 | ||
| 749 | 0.000154 0.000160 0.002163 0.000038 0.000063 | ||
| 750 | 0.000150 0.000145 0.002719 0.000038 0.000065 | ||
| 751 | 0.000145 0.000139 0.002226 0.000037 0.000074 | ||
| 752 | 0.000148 0.000140 0.002517 0.000038 0.000067 | ||
| 753 | 0.000148 0.000142 0.003734 0.000039 0.000067 | ||
| 754 | 0.000147 0.000143 0.002508 0.000039 0.000067 | ||
| 755 | 0.000146 0.000143 0.002288 0.000038 0.000067 | ||
| 756 | 0.000149 0.000143 0.002899 0.000039 0.000067 | ||
| 757 | 0.000150 0.000145 0.002232 0.000037 0.000065 | ||
| 758 | 0.000148 0.000142 0.002169 0.000039 0.000067 | ||
| 759 | 0.000161 0.000141 0.002196 0.000036 0.000060 | ||
| 760 | 0.000145 0.000137 0.002467 0.000040 0.000064 | ||
| 761 | 0.000147 0.000141 0.002168 0.000037 0.000063 | ||
| 762 | 0.000147 0.000139 0.002165 0.000037 0.000064 | ||
| 763 | 0.000146 0.000138 0.002167 0.000036 0.000060 | ||
| 764 | 0.000150 0.000141 0.002326 0.000039 0.000063 | ||
| 765 | 0.000149 0.000179 0.002197 0.000039 0.000063 | ||
| 766 | 0.000148 0.000142 0.002538 0.000039 0.000067 | ||
| 767 | 0.000148 0.000148 0.002555 0.000039 0.000067 | ||
| 768 | 0.000150 0.000144 0.002180 0.000038 0.000066 | ||
| 769 | 0.000245 0.000152 0.002203 0.000038 0.000065 | ||
| 770 | 0.000146 0.000142 0.002118 0.000036 0.000091 | ||
| 771 | 0.000648 0.000141 0.002173 0.000035 0.000058 | ||
| 772 | 0.000142 0.000149 0.002137 0.000037 0.000059 | ||
| 773 | 0.000144 0.000138 0.002191 0.000037 0.000063 | ||
| 774 | 0.000143 0.000137 0.002795 0.000039 0.000065 | ||
| 775 | 0.000147 0.000256 0.002250 0.000038 0.000064 | ||
| 776 | 0.000148 0.000142 0.002231 0.000040 0.000075 | ||
| 777 | 0.000149 0.000143 0.002174 0.000038 0.000061 | ||
| 778 | 0.000182 0.000708 0.002255 0.000038 0.000061 | ||
| 779 | 0.000181 0.000170 0.002222 0.000038 0.000060 | ||
| 780 | 0.000148 0.000141 0.002177 0.000038 0.000065 | ||
| 781 | 0.000147 0.000141 0.002478 0.000039 0.000065 | ||
| 782 | 0.000148 0.000141 0.002191 0.000039 0.000065 | ||
| 783 | 0.000146 0.000139 0.002161 0.000067 0.000063 | ||
| 784 | 0.000157 0.000138 0.002174 0.000036 0.000059 | ||
| 785 | 0.000143 0.000165 0.002396 0.000040 0.000067 | ||
| 786 | 0.000148 0.000141 0.002302 0.000044 0.000067 | ||
| 787 | 0.000148 0.000142 0.002226 0.000043 0.000065 | ||
| 788 | 0.000149 0.000142 0.002198 0.000038 0.000087 | ||
| 789 | 0.000147 0.000143 0.002221 0.000039 0.000066 | ||
| 790 | 0.000146 0.000142 0.002376 0.000065 0.000063 | ||
| 791 | 0.000152 0.000154 0.002201 0.000038 0.000062 | ||
| 792 | 0.000150 0.000142 0.002705 0.000039 0.000067 | ||
| 793 | 0.000149 0.000142 0.002267 0.000039 0.000067 | ||
| 794 | 0.000194 0.000149 0.002347 0.000039 0.000066 | ||
| 795 | 0.000155 0.000141 0.002594 0.000038 0.000066 | ||
| 796 | 0.000148 0.000141 0.002189 0.000038 0.000064 | ||
| 797 | 0.000202 0.000142 0.002155 0.000039 0.000062 | ||
| 798 | 0.000182 0.000146 0.002204 0.000037 0.000061 | ||
| 799 | 0.000146 0.000139 0.002466 0.000037 0.000065 | ||
| 800 | 0.000146 0.000140 0.002463 0.000036 0.000065 | ||
| 801 | 0.000146 0.000139 0.002209 0.000037 0.000063 | ||
| 802 | 0.000145 0.000138 0.002146 0.000036 0.000060 | ||
| 803 | 0.000181 0.000142 0.003356 0.000038 0.000068 | ||
| 804 | 0.000161 0.000142 0.002169 0.000038 0.000062 | ||
| 805 | 0.000146 0.000175 0.002538 0.000039 0.000061 | ||
| 806 | 0.000148 0.000141 0.002482 0.000039 0.000067 | ||
| 807 | 0.000148 0.000144 0.002450 0.000040 0.000066 | ||
| 808 | 0.000149 0.000143 0.002466 0.000043 0.000068 | ||
| 809 | 0.000148 0.000144 0.003551 0.000038 0.000068 | ||
| 810 | 0.000149 0.000142 0.002482 0.000039 0.000066 | ||
| 811 | 0.000149 0.000142 0.002220 0.000039 0.000066 | ||
| 812 | 0.000151 0.000140 0.002199 0.000038 0.000064 | ||
| 813 | 0.000148 0.000184 0.002185 0.000038 0.000066 | ||
| 814 | 0.000145 0.000140 0.002158 0.000036 0.000092 | ||
| 815 | 0.000158 0.000140 0.002262 0.000038 0.000062 | ||
| 816 | 0.000148 0.000143 0.002674 0.000039 0.000066 | ||
| 817 | 0.000148 0.000140 0.002421 0.000039 0.000066 | ||
| 818 | 0.000149 0.000149 0.002433 0.000038 0.000065 | ||
| 819 | 0.000146 0.000172 0.002187 0.000038 0.000065 | ||
| 820 | 0.000146 0.000140 0.002311 0.000039 0.000323 | ||
| 821 | 0.000149 0.000142 0.002180 0.000038 0.000091 | ||
| 822 | 0.000420 0.000143 0.002483 0.000038 0.000063 | ||
| 823 | 0.000685 0.000145 0.002136 0.000035 0.000064 | ||
| 824 | 0.000146 0.000145 0.002433 0.000038 0.000062 | ||
| 825 | 0.000146 0.000139 0.002496 0.000039 0.000066 | ||
| 826 | 0.000149 0.000139 0.003626 0.000041 0.000068 | ||
| 827 | 0.000153 0.000147 0.002272 0.000042 0.000067 | ||
| 828 | 0.000248 0.000155 0.002208 0.000038 0.000063 | ||
| 829 | 0.000146 0.000138 0.002524 0.000038 0.000068 | ||
| 830 | 0.000147 0.000140 0.002176 0.000210 0.000065 | ||
| 831 | 0.000147 0.000140 0.002166 0.000036 0.000060 | ||
| 832 | 0.000144 0.000146 0.002169 0.000036 0.000057 | ||
| 833 | 0.000144 0.000138 0.002207 0.000037 0.000063 | ||
| 834 | 0.000145 0.000138 0.002183 0.000037 0.000062 | ||
| 835 | 0.000145 0.000137 0.002167 0.000036 0.000059 | ||
| 836 | 0.000148 0.000453 0.002310 0.000038 0.000061 | ||
| 837 | 0.000183 0.000855 0.002326 0.000037 0.000061 | ||
| 838 | 0.000146 0.000175 0.002672 0.000036 0.000060 | ||
| 839 | 0.000143 0.000140 0.002238 0.000039 0.000065 | ||
| 840 | 0.000146 0.000139 0.002473 0.000037 0.000064 | ||
| 841 | 0.000146 0.000139 0.002196 0.000039 0.000065 | ||
| 842 | 0.000145 0.000139 0.002141 0.000036 0.000061 | ||
| 843 | 0.000174 0.000397 0.002175 0.000036 0.000059 | ||
| 844 | 0.000143 0.000139 0.002647 0.000037 0.000065 | ||
| 845 | 0.000147 0.000138 0.002196 0.000037 0.000064 | ||
| 846 | 0.000146 0.000138 0.002199 0.000037 0.000063 | ||
| 847 | 0.000146 0.000138 0.002167 0.000036 0.000066 | ||
| 848 | 0.000169 0.000141 0.002156 0.000036 0.000060 | ||
| 849 | 0.000143 0.000139 0.002180 0.000037 0.000065 | ||
| 850 | 0.000144 0.000136 0.002756 0.000039 0.000066 | ||
| 851 | 0.000150 0.000141 0.002919 0.000039 0.000066 | ||
| 852 | 0.000147 0.000140 0.002184 0.000036 0.000065 | ||
| 853 | 0.000145 0.000138 0.002168 0.000036 0.000091 | ||
| 854 | 0.000156 0.000139 0.002169 0.000036 0.000059 | ||
| 855 | 0.000143 0.000139 0.002741 0.000038 0.000065 | ||
| 856 | 0.000147 0.000140 0.002429 0.000037 0.000063 | ||
| 857 | 0.000145 0.000139 0.002226 0.000037 0.000064 | ||
| 858 | 0.000145 0.000139 0.003381 0.000040 0.000066 | ||
| 859 | 0.000153 0.000141 0.002262 0.000038 0.000064 | ||
| 860 | 0.000145 0.000140 0.002137 0.000036 0.000062 | ||
| 861 | 0.000154 0.000650 0.002217 0.000038 0.000063 | ||
| 862 | 0.000184 0.000143 0.002209 0.000038 0.000062 | ||
| 863 | 0.000153 0.000142 0.002907 0.000039 0.000066 | ||
| 864 | 0.000147 0.000142 0.002158 0.000038 0.000064 | ||
| 865 | 0.000146 0.000140 0.002953 0.000039 0.000068 | ||
| 866 | 0.000148 0.000143 0.002208 0.000039 0.000065 | ||
| 867 | 0.000149 0.000139 0.002187 0.000036 0.000065 | ||
| 868 | 0.000144 0.000139 0.002157 0.000036 0.000061 | ||
| 869 | 0.000154 0.000926 0.002139 0.000036 0.000059 | ||
| 870 | 0.000183 0.000140 0.002526 0.000038 0.000062 | ||
| 871 | 0.000148 0.000142 0.002207 0.000038 0.000066 | ||
| 872 | 0.000147 0.000139 0.002790 0.000039 0.000069 | ||
| 873 | 0.000149 0.000144 0.002251 0.000038 0.000066 | ||
| 874 | 0.000151 0.000140 0.002220 0.000039 0.000066 | ||
| 875 | 0.000148 0.000142 0.002523 0.000038 0.000064 | ||
| 876 | 0.000151 0.000138 0.002151 0.000037 0.000065 | ||
| 877 | 0.000147 0.000140 0.002251 0.000037 0.000062 | ||
| 878 | 0.000149 0.000139 0.002607 0.000037 0.000065 | ||
| 879 | 0.000147 0.000141 0.003380 0.000037 0.000066 | ||
| 880 | 0.000147 0.000139 0.002285 0.000069 0.000066 | ||
| 881 | 0.000149 0.000142 0.002566 0.000038 0.000067 | ||
| 882 | 0.000147 0.000142 0.002523 0.000038 0.000067 | ||
| 883 | 0.000152 0.000143 0.002215 0.000038 0.000067 | ||
| 884 | 0.000150 0.000144 0.002243 0.000038 0.000075 | ||
| 885 | 0.000149 0.000141 0.002148 0.000036 0.000063 | ||
| 886 | 0.000182 0.000144 0.002167 0.000036 0.000062 | ||
| 887 | 0.000278 0.000155 0.002631 0.000036 0.000061 | ||
| 888 | 0.000149 0.000139 0.003175 0.000040 0.000066 | ||
| 889 | 0.000156 0.000140 0.002660 0.000038 0.000065 | ||
| 890 | 0.000148 0.000141 0.006171 0.000067 0.000069 | ||
| 891 | 0.000164 0.000142 0.002713 0.000038 0.000064 | ||
| 892 | 0.000161 0.000150 0.002270 0.000038 0.000081 | ||
| 893 | 0.000160 0.000283 0.002276 0.000038 0.000083 | ||
| 894 | 0.000168 0.000150 0.002207 0.000037 0.000072 | ||
| 895 | 0.000151 0.000669 0.002160 0.000038 0.000062 | ||
| 896 | 0.000196 0.000156 0.002363 0.000036 0.000061 | ||
| 897 | 0.000162 0.000141 0.002160 0.000037 0.000077 | ||
| 898 | 0.000147 0.000141 0.002676 0.000038 0.000096 | ||
| 899 | 0.000162 0.000143 0.002263 0.000037 0.000065 | ||
| 900 | 0.000162 0.000141 0.002206 0.000036 0.000080 | ||
| 901 | 0.000146 0.000139 0.002149 0.000036 0.000060 | ||
| 902 | 0.000169 0.000884 0.002163 0.000036 0.000076 | ||
| 903 | 0.000187 0.000140 0.002222 0.000036 0.000061 | ||
| 904 | 0.000145 0.000140 0.002192 0.000037 0.000084 | ||
| 905 | 0.000145 0.000138 0.002619 0.000039 0.000116 | ||
| 906 | 0.000158 0.000149 0.002213 0.000038 0.000089 | ||
| 907 | 0.000145 0.000183 0.002154 0.000038 0.000089 | ||
| 908 | 0.000162 0.000142 0.002142 0.000037 0.000061 | ||
| 909 | 0.000146 0.000178 0.002401 0.000038 0.000062 | ||
| 910 | 0.000145 0.000150 0.002741 0.000037 0.000081 | ||
| 911 | 0.000147 0.000139 0.002360 0.000040 0.000067 | ||
| 912 | 0.000151 0.000153 0.002459 0.000039 0.000075 | ||
| 913 | 0.000148 0.000155 0.002459 0.000037 0.000091 | ||
| 914 | 0.000153 0.000152 0.002174 0.000036 0.000064 | ||
| 915 | 0.000424 0.000149 0.002116 0.000036 0.000068 | ||
| 916 | 0.000166 0.000168 0.002625 0.000038 0.000076 | ||
| 917 | 0.000146 0.000141 0.002957 0.000038 0.000067 | ||
| 918 | 0.000160 0.000142 0.002501 0.000039 0.000079 | ||
| 919 | 0.000147 0.000143 0.002219 0.000038 0.000066 | ||
| 920 | 0.000160 0.000143 0.002771 0.000040 0.000079 | ||
| 921 | 0.000148 0.000150 0.002426 0.000037 0.000082 | ||
| 922 | 0.000146 0.000138 0.002134 0.000036 0.000103 | ||
| 923 | 0.000659 0.000143 0.002197 0.000036 0.000073 | ||
| 924 | 0.000179 0.000153 0.002301 0.000038 0.000074 | ||
| 925 | 0.000147 0.000142 0.002258 0.000038 0.000066 | ||
| 926 | 0.000146 0.000141 0.002210 0.000038 0.000066 | ||
| 927 | 0.000161 0.000141 0.002235 0.000038 0.000084 | ||
| 928 | 0.000145 0.000138 0.002131 0.000036 0.000060 | ||
| 929 | 0.000151 0.000211 0.002265 0.000038 0.000062 | ||
| 930 | 0.000147 0.000142 0.002254 0.000038 0.000067 | ||
| 931 | 0.000148 0.000143 0.002217 0.000038 0.000079 | ||
| 932 | 0.000160 0.000155 0.002229 0.000038 0.000066 | ||
| 933 | 0.000145 0.000142 0.002129 0.000038 0.000065 | ||
| 934 | 0.000165 0.000140 0.002140 0.000036 0.000076 | ||
| 935 | 0.000162 0.000142 0.002452 0.000039 0.000079 | ||
| 936 | 0.000148 0.000143 0.002253 0.000059 0.000068 | ||
| 937 | 0.000164 0.000142 0.003378 0.000039 0.000096 | ||
| 938 | 0.000150 0.000194 0.002192 0.000039 0.000067 | ||
| 939 | 0.000161 0.000152 0.002202 0.000037 0.000077 | ||
| 940 | 0.000160 0.000141 0.002258 0.000039 0.000067 | ||
| 941 | 0.000167 0.000143 0.002706 0.000039 0.000067 | ||
| 942 | 0.000149 0.000155 0.002280 0.000037 0.000100 | ||
| 943 | 0.000174 0.000144 0.002134 0.000037 0.000090 | ||
| 944 | 0.001167 0.000154 0.002224 0.000038 0.000067 | ||
| 945 | 0.000162 0.000155 0.002181 0.000035 0.000065 | ||
| 946 | 0.000773 0.000153 0.002145 0.000036 0.000060 | ||
| 947 | 0.000149 0.000161 0.002160 0.000036 0.000071 | ||
| 948 | 0.000208 0.000144 0.002164 0.000035 0.000060 | ||
| 949 | 0.000143 0.000138 0.002156 0.000036 0.000064 | ||
| 950 | 0.000143 0.000138 0.002225 0.000055 0.000066 | ||
| 951 | 0.000147 0.000141 0.002734 0.000038 0.000065 | ||
| 952 | 0.000145 0.000147 0.002173 0.000037 0.000064 | ||
| 953 | 0.000146 0.000139 0.002112 0.000037 0.000060 | ||
| 954 | 0.000144 0.000137 0.002708 0.000038 0.000064 | ||
| 955 | 0.000144 0.000139 0.002421 0.000037 0.000064 | ||
| 956 | 0.000145 0.000140 0.002449 0.000037 0.000063 | ||
| 957 | 0.000143 0.000138 0.002278 0.000038 0.000064 | ||
| 958 | 0.000145 0.000140 0.002427 0.000040 0.000130 | ||
| 959 | 0.000151 0.000142 0.002155 0.000036 0.000064 | ||
| 960 | 0.000181 0.000139 0.002435 0.000036 0.000060 | ||
| 961 | 0.000145 0.000138 0.003527 0.000038 0.000065 | ||
| 962 | 0.000146 0.000178 0.002178 0.000036 0.000060 | ||
| 963 | 0.000145 0.000138 0.002139 0.000037 0.000065 | ||
| 964 | 0.000145 0.000137 0.003006 0.000037 0.000064 | ||
| 965 | 0.000146 0.000139 0.002204 0.000037 0.000065 | ||
| 966 | 0.000145 0.000139 0.002211 0.000038 0.000062 | ||
| 967 | 0.000182 0.000140 0.002221 0.000036 0.000061 | ||
| 968 | 0.000145 0.000139 0.003169 0.000038 0.000068 | ||
| 969 | 0.000149 0.000174 0.002414 0.000038 0.000066 | ||
| 970 | 0.000147 0.000142 0.002234 0.000038 0.000066 | ||
| 971 | 0.000149 0.000143 0.002678 0.000038 0.000065 | ||
| 972 | 0.000148 0.000141 0.002886 0.000038 0.000066 | ||
| 973 | 0.000145 0.000140 0.002250 0.000038 0.000065 | ||
| 974 | 0.000148 0.000139 0.002181 0.000035 0.000065 | ||
| 975 | 0.000718 0.000142 0.002141 0.000035 0.000059 | ||
| 976 | 0.000189 0.000140 0.002383 0.000036 0.000059 | ||
| 977 | 0.000145 0.000139 0.002206 0.000039 0.000065 | ||
| 978 | 0.000154 0.000186 0.002457 0.000038 0.000066 | ||
| 979 | 0.000190 0.000141 0.002224 0.000038 0.000066 | ||
| 980 | 0.000149 0.000141 0.002151 0.000037 0.000066 | ||
| 981 | 0.000215 0.000143 0.002151 0.000035 0.000061 | ||
| 982 | 0.000144 0.000138 0.002822 0.000039 0.000065 | ||
| 983 | 0.000147 0.000139 0.002275 0.000038 0.000065 | ||
| 984 | 0.000148 0.000141 0.002211 0.000036 0.000064 | ||
| 985 | 0.000146 0.000138 0.002201 0.000037 0.000066 | ||
| 986 | 0.000148 0.000140 0.002273 0.000038 0.000068 | ||
| 987 | 0.000150 0.000144 0.002188 0.000037 0.000063 | ||
| 988 | 0.000152 0.000151 0.002190 0.000037 0.000062 | ||
| 989 | 0.000146 0.000142 0.003145 0.000039 0.000067 | ||
| 990 | 0.000151 0.000139 0.002218 0.000037 0.000065 | ||
| 991 | 0.000145 0.000138 0.002264 0.000037 0.000066 | ||
| 992 | 0.000148 0.000142 0.003011 0.000039 0.000067 | ||
| 993 | 0.000149 0.000141 0.002196 0.000038 0.000065 | ||
| 994 | 0.000146 0.000141 0.002188 0.000036 0.000060 | ||
| 995 | 0.000149 0.000140 0.002190 0.000035 0.000060 | ||
| 996 | 0.000144 0.000137 0.002641 0.000038 0.000064 | ||
| 997 | 0.000146 0.000138 0.002182 0.000043 0.000065 | ||
| 998 | 0.000146 0.000141 0.002216 0.000036 0.000064 | ||
| 999 | 0.000147 0.000139 0.002294 0.000039 0.000068 | ||
| 1000 | 0.000657 0.000145 0.002143 0.000037 0.000062 | ||
| 1001 | 0.000154 0.000415 0.002237 0.000040 0.000084 | ||
diff --git a/src/files/go-profiling/golang-profiling-cpu.pdf b/src/files/go-profiling/golang-profiling-cpu.pdf new file mode 100644 index 0000000..15241cb --- /dev/null +++ b/src/files/go-profiling/golang-profiling-cpu.pdf | |||
| Binary files differ | |||
diff --git a/src/files/go-profiling/golang-profiling-mem.pdf b/src/files/go-profiling/golang-profiling-mem.pdf new file mode 100644 index 0000000..822e445 --- /dev/null +++ b/src/files/go-profiling/golang-profiling-mem.pdf | |||
| Binary files differ | |||
diff --git a/src/files/iot-application/iot-app-output.png b/src/files/iot-application/iot-app-output.png new file mode 100644 index 0000000..1c80589 --- /dev/null +++ b/src/files/iot-application/iot-app-output.png | |||
| Binary files differ | |||
diff --git a/src/files/iot-application/iot-rest-example.png b/src/files/iot-application/iot-rest-example.png new file mode 100644 index 0000000..3ed86aa --- /dev/null +++ b/src/files/iot-application/iot-rest-example.png | |||
| Binary files differ | |||
diff --git a/src/files/iot-application/iot-sqlite-db.png b/src/files/iot-application/iot-sqlite-db.png new file mode 100644 index 0000000..82e1e29 --- /dev/null +++ b/src/files/iot-application/iot-sqlite-db.png | |||
| Binary files differ | |||
diff --git a/src/files/iot-application/kcachegrind.png b/src/files/iot-application/kcachegrind.png new file mode 100644 index 0000000..0dc48ab --- /dev/null +++ b/src/files/iot-application/kcachegrind.png | |||
| Binary files differ | |||
diff --git a/src/files/iot-application/profiling-viewer.png b/src/files/iot-application/profiling-viewer.png new file mode 100644 index 0000000..a450513 --- /dev/null +++ b/src/files/iot-application/profiling-viewer.png | |||
| Binary files differ | |||
diff --git a/src/files/iot-application/simple-iot-application-overview.svg b/src/files/iot-application/simple-iot-application-overview.svg new file mode 100644 index 0000000..817666d --- /dev/null +++ b/src/files/iot-application/simple-iot-application-overview.svg | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||
| 2 | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="623px" height="482px" version="1.1" content="<mxfile userAgent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36" version="7.1.3" editor="www.draw.io" type="google"><diagram id="d1a10cf0-d877-4170-d86f-ec45460d7050" name="Page-1">7Vnbbts4EP0aPzYQdbP9mKTNFtjtokgWSPpIi7RNrCRqKfq2X79DiZREUU5sV267RREgoI6o4XDmkHNIT4L7bP+bwMX6Eyc0nfge2U+C9xPfn8Yz+K+AQw1Ecw2sBCM1hFrgif1LNehpdMMILa2OkvNUssIGE57nNJEWhoXgO7vbkqf2qAVeUQd4SnDqos+MyHWNziKvxT9StlqbkZGn32TYdNZAucaE7zpQ8GES3AvOZd3K9vc0VbEzcam/ezjytnFM0Fye8oFff7DF6UbP7T2WeIFLqv2TBzNpcLVQzeSQspxQMQnudmsm6VOBE4XvINWArWWWwhOC5oJvoCP5Y2GAUgr+dxMymOzdkufySY+hnd9SIen+6HxQEyVgF+UZleIAXfQHwVzPSDMrjHWgd22e4qiG1p0UzXQ3rJmxaiy3wYOGjt9wLAMnlhM/TqUKBDRWqmEANW0ruvE/G25evCsrwt9CBxQV+/alsfJMF8rVokhZgiXjuTELHtaW7dEAdjwgbNuHjnpp1p/xI3RdamyIgcFP9QmwAbdO8XRw2Dft9wguarrCg/c2t10qj8Fesy0ces8d9vpmL+nSt9lgvoa/4QB/eyGiOblV+yc85TynVRywkAZLUlyWLLEjBXMXhxcV1RsUzgzwpQLm8VQBeyZfdNhVu34XVV3JA1MOV+/cmFemPlPBYLJqR6q61V5T4uzhvTTAzPhGJNTaCWE6Kyo7C9pNVicZ0UAuDCZoCotzazsxlB89wmfOquXWcCGyuBD1t6jaef1Vd4vvG5r2DAU9Q/WUHUOQVHzodCtUh/IVhyObvJFnlR5o1BZbLjYxPYme0Vn0bKloMVSzdpies2japSe68VCXnsihZ2X6F0H/JwQN5+iqBI1RMItmOF7OEY0hPO9cxj4LKCoDhY2A6Cpqb08qVVBi5FA9uucpFy3Nl0DNHoRTtsrV+gCqVRpOFSyQEemtfpExQtQwgwVwhBrn9xVa6Na4cIC1/ggVzsnQ1MnQI8XktQSVP3+GIhT9OBmaORm6FWTDcj6QpE+/P4IQ8s6We+gSubdSBUZv6GOfYvzYLqVo4BSD/IEUxNdIwdzdxqoDyEIdpIGhIwc24Zmq21cJbPhDBdZcZ4ytuI/IkJeOrDYSp6u+b/yoq3Ac+X2ZbAlc2TK8yL+Xjukvtst1DOoZupbQ7p0SzeXF1XQMMkvvq6T3qFSd9ql6PXLOf5HzDHJG35yc/iWbKMHluilRr/LRlm0TP7ir/s6g3PfiTjwbTsXZ3EHxG4aOcOeC9CK8REmYYN+fYoo9OnCG6t1OLnFi305+pOmWKsHs3lI+8o3UN6vKyWM3lKNLeVHn9jwlb8uortzsK6QHnLFU5eYvllFYm96fdAf/H3mG82uIqGBq0SGYuyJqeqXzgcOP+Hr8wAX7dhRJ6fLnYUgQeG8yZD4OQ+Cx/bWs3nDanxyDD/8B</diagram></mxfile>"><defs/><g transform="translate(0.5,0.5)"><path d="M 283 367 C 283 345.67 348 345.67 348 367 L 348 415 C 348 436.33 283 436.33 283 415 Z" fill="#ffffff" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 283 367 C 283 383 348 383 348 367" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(287.5,395.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="54" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 54px; white-space: nowrap; word-wrap: normal; font-weight: bold; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Database</div></div></foreignObject><text x="27" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica" font-weight="bold">Database</text></switch></g><rect x="211" y="211" width="200" height="100" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="none"/><g transform="translate(252.5,234.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="115" height="51" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 115px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><b><font style="font-size: 15px">Web application</font></b><div><b><font size="4"><br /></font></b></div><div><b><br /></b></div></div></div></foreignObject><text x="58" y="32" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 274.76 391 L 251 391 Q 241 391 241 381 L 241 308" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 280.76 391 L 272.76 395 L 274.76 391 L 272.76 387 Z" fill="#000000" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 348 391 L 372 391 Q 382 391 382 381 L 382 321.24" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 382 315.24 L 386 323.24 L 382 321.24 L 378 323.24 Z" fill="#000000" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(177.5,327.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="50" height="26" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 50px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Write<div>datapoint</div></div></div></foreignObject><text x="25" y="19" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><g transform="translate(397.5,327.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="56" height="26" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 56px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Read<div>datapoints</div></div></div></foreignObject><text x="28" y="19" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="151" y="51" width="120" height="60" rx="9" ry="9" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="none"/><g transform="translate(182.5,67.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="55" height="26" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 55px; white-space: nowrap; word-wrap: normal; font-weight: bold; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Arduino<div>MKR1000</div></div></div></foreignObject><text x="28" y="19" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica" font-weight="bold">[Not supported by viewer]</text></switch></g><rect x="351" y="51" width="120" height="60" rx="9" ry="9" fill="#ffffff" stroke="#000000" stroke-width="2" pointer-events="none"/><g transform="translate(372.5,74.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="75" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 77px; white-space: nowrap; word-wrap: normal; font-weight: bold; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Web browser</div></div></foreignObject><text x="38" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica" font-weight="bold">Web browser</text></switch></g><path d="M 254.57 205.86 L 218.81 177.25 Q 211 171 211 161 L 211 111" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 259.25 209.6 L 250.51 207.73 L 254.57 205.86 L 255.51 201.48 Z" fill="#000000" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 367.43 205.86 L 403.19 177.25 Q 411 171 411 161 L 411 119.24" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 362.75 209.6 L 366.49 201.48 L 367.43 205.86 L 371.49 207.73 Z" fill="#000000" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 411 113.24 L 415 121.24 L 411 119.24 L 407 121.24 Z" fill="#000000" stroke="#000000" stroke-width="2" stroke-miterlimit="10" pointer-events="none"/><path d="M 571 171 L 51 171" fill="none" stroke="#b3b3b3" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="6 6" pointer-events="none"/><g transform="translate(350.5,284.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="45" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: "Times New Roman"; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 46px; white-space: nowrap; word-wrap: normal; font-weight: bold; text-align: right;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font face="Helvetica">Route: /</font></div></div></foreignObject><text x="23" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Times New Roman" font-weight="bold">[Not supported by viewer]</text></switch></g><g transform="translate(222.5,284.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="62" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: "Times New Roman"; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 63px; white-space: nowrap; word-wrap: normal; font-weight: bold;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font face="Helvetica">Route: /api</font></div></div></foreignObject><text x="31" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Times New Roman" font-weight="bold">[Not supported by viewer]</text></switch></g></g></svg> \ No newline at end of file | ||
diff --git a/src/files/iot-application/simple-iot-application.zip b/src/files/iot-application/simple-iot-application.zip new file mode 100644 index 0000000..46d3205 --- /dev/null +++ b/src/files/iot-application/simple-iot-application.zip | |||
| Binary files differ | |||
diff --git a/src/files/iot-application/snakeviz.png b/src/files/iot-application/snakeviz.png new file mode 100644 index 0000000..5bab395 --- /dev/null +++ b/src/files/iot-application/snakeviz.png | |||
| Binary files differ | |||
diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..383737b --- /dev/null +++ b/src/index.html | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | <h2>Research</h2> | ||
| 2 | <ul class="article-list"> | ||
| 3 | {{ range .Site.Pages.Children "research/" }} | ||
| 4 | <li> | ||
| 5 | {{ template "date" .Date }} | ||
| 6 | <a href="{{ $.Rel .Url }}" title="{{ .Title }}">{{ .Title }}</a> | ||
| 7 | </li> | ||
| 8 | {{ end }} | ||
| 9 | </ul> | ||
| 10 | |||
| 11 | <h2>Blog posts</h2> | ||
| 12 | <ul class="article-list"> | ||
| 13 | {{ range .Site.Pages.Children "blog/" }} | ||
| 14 | <li> | ||
| 15 | {{ template "date" .Date }} | ||
| 16 | <a href="{{ $.Rel .Url }}" title="{{ .Title }}">{{ .Title }}</a> | ||
| 17 | </li> | ||
| 18 | {{ end }} | ||
| 19 | </ul> | ||
diff --git a/src/research/encoding-binary-data-into-dna-sequence.md b/src/research/encoding-binary-data-into-dna-sequence.md new file mode 100644 index 0000000..3bfeaab --- /dev/null +++ b/src/research/encoding-binary-data-into-dna-sequence.md | |||
| @@ -0,0 +1,345 @@ | |||
| 1 | title: Encoding binary data into DNA sequence | ||
| 2 | date: 2019-01-03 | ||
| 3 | tags: research | ||
| 4 | hide: false | ||
| 5 | ---- | ||
| 6 | |||
| 7 | ## Initial thoughts | ||
| 8 | |||
| 9 | Imagine a world where you could go outside and take a leaf from a tree and put it through your personal DNA sequencer and get data like music, videos or computer programs from it. Well, this is all possible now. It was not done on a large scale because it is quite expensive to create DNA strands but it's possible. | ||
| 10 | |||
| 11 | Encoding data into DNA sequence is relatively simple process once you understand the relationship between binary data and nucleotides and scientists have been making large leaps in this field in order to provide viable long-term storage solution for our data that would potentially survive our specie if case of global disaster. We could imprint all the world's knowledge into plants and ensure the survival of our knowledge. | ||
| 12 | |||
| 13 | More optimistic usage for this technology would be easier storage of ever growing data we produce every day. Once machines for sequencing DNA become fast enough and cheaper this could mean the next evolution of storing data and abandoning classical hard and solid state drives in data warehouses. | ||
| 14 | |||
| 15 | As we currently stand this is still not viable but it is quite an amazing and cool technology. | ||
| 16 | |||
| 17 | My interests in this field are purely in encoding processes and experimental testing mainly because I don't have the access to this expensive machines. My initial goal was to create a toolkit that can be used by everybody to encode their data into a proper DNA sequence. | ||
| 18 | |||
| 19 | ## Glossary | ||
| 20 | |||
| 21 | **deoxyribose** | ||
| 22 | : A five-carbon sugar molecule with a hydrogen atom rather than a hydroxyl group in the 2′ position; the sugar component of DNA nucleotides. | ||
| 23 | |||
| 24 | **double helix** | ||
| 25 | : The molecular shape of DNA in which two strands of nucleotides wind around each other in a spiral shape. | ||
| 26 | |||
| 27 | **nitrogenous base** | ||
| 28 | : A nitrogen-containing molecule that acts as a base; often referring to one of the purine or pyrimidine components of nucleic acids. | ||
| 29 | |||
| 30 | **phosphate group** | ||
| 31 | : A molecular group consisting of a central phosphorus atom bound to four oxygen atoms. | ||
| 32 | |||
| 33 | **RGB** | ||
| 34 | : The RGB color model is an additive color model in which red, green and blue light are added together in various ways to reproduce a broad array of colors. | ||
| 35 | |||
| 36 | **GCC** | ||
| 37 | : The GNU Compiler Collection is a compiler system produced by the GNU Project supporting various programming languages. | ||
| 38 | |||
| 39 | ## Data encoding | ||
| 40 | |||
| 41 | **TL;DR:** Encoding involves the use of a code to change original data into a form that can be used by an external process [^1]. | ||
| 42 | |||
| 43 | Encoding is the process of converting data into a format required for a number of information processing needs, including: | ||
| 44 | |||
| 45 | - Program compiling and execution | ||
| 46 | - Data transmission, storage and compression/decompression | ||
| 47 | - Application data processing, such as file conversion | ||
| 48 | |||
| 49 | Encoding can have two meanings[^1]: | ||
| 50 | |||
| 51 | - In computer technology, encoding is the process of applying a specific code, such as letters, symbols and numbers, to data for conversion into an equivalent cipher. | ||
| 52 | - In electronics, encoding refers to analog to digital conversion. | ||
| 53 | |||
| 54 | ## Quick history of DNA | ||
| 55 | |||
| 56 | - **1869** - Friedrich Miescher identifies "nuclein". | ||
| 57 | - **1900s** - The Eugenics Movement. | ||
| 58 | - **1900** – Mendel's theories are rediscovered by researchers. | ||
| 59 | - **1944** - Oswald Avery identifies DNA as the 'transforming principle'. | ||
| 60 | - **1952** - Rosalind Franklin photographs crystallized DNA fibres. | ||
| 61 | - **1953** - James Watson and Francis Crick discover the double helix structure of DNA. | ||
| 62 | - **1965** - Marshall Nirenberg is the first person to sequence the bases in each codon. | ||
| 63 | - **1983** - Huntington's disease is the first mapped genetic disease. | ||
| 64 | - **1990** - The Human Genome Project begins. | ||
| 65 | - **1995** - Haemophilus Influenzae is the first bacterium genome sequenced. | ||
| 66 | - **1996** - Dolly the sheep is cloned. | ||
| 67 | - **1999** - First human chromosome is decoded. | ||
| 68 | - **2000** – Genetic code of the fruit fly is decoded. | ||
| 69 | - **2002** – Mouse is the first mammal to have its genome decoded. | ||
| 70 | - **2003** – The Human Genome Project is completed. | ||
| 71 | - **2013** – DNA Worldwide and Eurofins Forensic discover identical twins have differences in their genetic makeup [^2]. | ||
| 72 | |||
| 73 | ## What is DNA? | ||
| 74 | |||
| 75 | Deoxyribonucleic acid, a self-replicating material which is **present in nearly all living organisms** as the main constituent of chromosomes. It is the **carrier of genetic information**. | ||
| 76 | |||
| 77 | > The nitrogen in our DNA, the calcium in our teeth, the iron in our blood, the carbon in our apple pies were made in the interiors of collapsing stars. We are made of starstuff. | ||
| 78 | > | ||
| 79 | > **-- Carl Sagan, Cosmos** | ||
| 80 | |||
| 81 | The nucleotide in DNA consists of a sugar (deoxyribose), one of four bases (cytosine (C), thymine (T), adenine (A), guanine (G)), and a phosphate. Cytosine and thymine are pyrimidine bases, while adenine and guanine are purine bases. The sugar and the base together are called a nucleoside. | ||
| 82 | |||
| 83 |  | ||
| 84 | |||
| 85 | *DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and cytosine pairs with guanine. (credit a: modification of work by Jerome Walker, Dennis Myts) [^3]* | ||
| 86 | |||
| 87 | ## Encode binary data into DNA sequence | ||
| 88 | |||
| 89 | As an input file you can use any file you want: | ||
| 90 | - ASCII files, | ||
| 91 | - Compiled programs, | ||
| 92 | - Multimedia files (MP3, MP4, MVK, etc), | ||
| 93 | - Images, | ||
| 94 | - Database files, | ||
| 95 | - etc. | ||
| 96 | |||
| 97 | Note: If you would copy all the bytes from RAM to file or pipe data to file you could encode also this data as long as you provide file pointer to the encoder. | ||
| 98 | |||
| 99 | ### Basic Encoding | ||
| 100 | |||
| 101 | As already mentioned, the Basic Encoding is based on a simple mapping. Since DNA is composed of 4 nucleotides (Adenine, Cytosine, Guanine, Thymine; usually referred using the first letter). Using this technique we can encode | ||
| 102 | |||
| 103 | $$ log_2(4) = log_2(2^2) = 2 bits $$ | ||
| 104 | |||
| 105 | using a single nucleotide. In this way, we are able to use the 4 bases that compose the DNA strand to encode each byte of data. | ||
| 106 | |||
| 107 | | Two bits | Nucleotides | | ||
| 108 | | -------- | ---------------- | | ||
| 109 | | 00 | **A** (Adenine) | | ||
| 110 | | 10 | **G** (Guanine) | | ||
| 111 | | 01 | **C** (Cytosine) | | ||
| 112 | | 11 | **T** (Thymine) | | ||
| 113 | |||
| 114 | With this in mind we can simply encode any data by using two-bit to Nucleotides conversion | ||
| 115 | |||
| 116 | ```pascal | ||
| 117 | { Algorithm 1: Naive byte array to DNA encode } | ||
| 118 | procedure EncodeToDNASequence(f) string | ||
| 119 | begin | ||
| 120 | enc string | ||
| 121 | while not eof(f) do | ||
| 122 | c byte := buffer[0] { Read 1 byte from buffer } | ||
| 123 | bin integer := sprintf('08b', c) { Convert to string binary } | ||
| 124 | for e in range[0, 2, 4, 6] do | ||
| 125 | if e[0] == 48 and e[1] == 48 then { 0x00 - A (Adenine) } | ||
| 126 | enc += 'A' | ||
| 127 | else if e[0] == 48 and e[1] == 49 then { 0x01 - G (Guanine) } | ||
| 128 | enc += 'G' | ||
| 129 | else if e[0] == 49 and e[1] == 48 then { 0x10 - C (Cytosine) } | ||
| 130 | enc += 'C' | ||
| 131 | else if e[0] == 49 and e[1] == 49 then { 0x11 - T (Thymine) } | ||
| 132 | enc += 'T' | ||
| 133 | return enc { Return DNA sequence } | ||
| 134 | end | ||
| 135 | ``` | ||
| 136 | |||
| 137 | Another encoding would be **Goldman encoding**. Using this encoding helps with Nonsense mutation (amino acids replaced by a stop codon) that occurs and is the most problematic during translation because it leads to truncated amino acid sequences, which in turn results in truncated proteins. [^4] | ||
| 138 | |||
| 139 | [Where to store big data? In DNA: Nick Goldman at TEDxPrague](https://www.youtube.com/watch?v=a4PiGWNsIEU) | ||
| 140 | |||
| 141 | ### FASTA file format | ||
| 142 | |||
| 143 | In bioinformatics, FASTA format is a text-based format for representing either nucleotide sequences or peptide sequences, in which nucleotides or amino acids are represented using single-letter codes. The format also allows for sequence names and comments to precede the sequences. The format originates from the FASTA software package, but has now become a standard in the field of bioinformatics. [^5] | ||
| 144 | |||
| 145 | The first line in a FASTA file started either with a ">" (greater-than) symbol or, less frequently, a ";" (semicolon) was taken as a comment. Subsequent lines starting with a semicolon would be ignored by software. Since the only comment used was the first, it quickly became used to hold a summary description of the sequence, often starting with a unique library accession number, and with time it has become commonplace to always use ">" for the first line and to not use ";" comments (which would otherwise be ignored). | ||
| 146 | |||
| 147 | ```text | ||
| 148 | ;LCBO - Prolactin precursor - Bovine | ||
| 149 | ; a sample sequence in FASTA format | ||
| 150 | MDSKGSSQKGSRLLLLLVVSNLLLCQGVVSTPVCPNGPGNCQVSLRDLFDRAVMVSHYIHDLSS | ||
| 151 | EMFNEFDKRYAQGKGFITMALNSCHTSSLPTPEDKEQAQQTHHEVLMSLILGLLRSWNDPLYHL | ||
| 152 | VTEVRGMKGAPDAILSRAIEIEEENKRLLEGMEMIFGQVIPGAKETEPYPVWSGLPSLQTKDED | ||
| 153 | ARYSAFYNLLHCLRRDSSKIDTYLKLLNCRIIYNNNC* | ||
| 154 | |||
| 155 | >MCHU - Calmodulin - Human, rabbit, bovine, rat, and chicken | ||
| 156 | ADQLTEEQIAEFKEAFSLFDKDGDGTITTKELGTVMRSLGQNPTEAELQDMINEVDADGNGTID | ||
| 157 | FPEFLTMMARKMKDTDSEEEIREAFRVFDKDGNGYISAAELRHVMTNLGEKLTDEEVDEMIREA | ||
| 158 | DIDGDGQVNYEEFVQMMTAK* | ||
| 159 | |||
| 160 | >gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus] | ||
| 161 | LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV | ||
| 162 | EWIWGGFSVDKATLNRFFAFHFILPFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLG | ||
| 163 | LLILILLLLLLALLSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVIL | ||
| 164 | GLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGX | ||
| 165 | IENY | ||
| 166 | ``` | ||
| 167 | |||
| 168 | FASTA format was extended by [FASTQ](https://en.wikipedia.org/wiki/FASTQ_format) format from the [Sanger Centre](https://www.sanger.ac.uk/) in Cambridge. | ||
| 169 | |||
| 170 | ### PNG encoded DNA sequence | ||
| 171 | |||
| 172 | | Nucleotides | RGB | Color name | | ||
| 173 | | ------------- | ----------- | ---------- | | ||
| 174 | | A -> Adenine | (0,0,255) | Blue | | ||
| 175 | | G -> Guanine | (0,100,0) | Green | | ||
| 176 | | C -> Cytosine | (255,0,0) | Red | | ||
| 177 | | T -> Thymine | (255,255,0) | Yellow | | ||
| 178 | |||
| 179 | With this in mind we can create a simple algorithm to create PNG representation of a DNA sequence. | ||
| 180 | |||
| 181 | ```pascal | ||
| 182 | { Algorithm 2: Naive DNA to PNG encode from FASTA file } | ||
| 183 | procedure EncodeDNASequenceToPNG(f) | ||
| 184 | begin | ||
| 185 | i image | ||
| 186 | while not eof(f) do | ||
| 187 | c char := buffer[0] { Read 1 char from buffer } | ||
| 188 | case c of | ||
| 189 | 'A': color := RGB(0, 0, 255) { Blue } | ||
| 190 | 'G': color := RGB(0, 100, 0) { Green } | ||
| 191 | 'C': color := RGB(255, 0, 0) { Red } | ||
| 192 | 'T': color := RGB(255, 255, 0) { Yellow } | ||
| 193 | drawRect(i, [x, y], color) | ||
| 194 | save(i) { Save PNG image } | ||
| 195 | end | ||
| 196 | ``` | ||
| 197 | |||
| 198 | ## Encoding text file in practice | ||
| 199 | |||
| 200 | In this example we will take a simple text file as our input stream for encoding. This file will have a quote from Niels Bohr and saved as txt file. | ||
| 201 | |||
| 202 | > How wonderful that we have met with a paradox. Now we have some hope of making progress. | ||
| 203 | > ― Niels Bohr | ||
| 204 | |||
| 205 | First we encode text file into FASTA file. | ||
| 206 | |||
| 207 | ```bash | ||
| 208 | ./dnae-encode -i quote.txt -o quote.fa | ||
| 209 | 2019/01/10 00:38:29 Gathering input file stats | ||
| 210 | 2019/01/10 00:38:29 Starting encoding ... | ||
| 211 | 106 B / 106 B [==================================] 100.00% 0s | ||
| 212 | 2019/01/10 00:38:29 Saving to FASTA file ... | ||
| 213 | 2019/01/10 00:38:29 Output FASTA file length is 438 B | ||
| 214 | 2019/01/10 00:38:29 Process took 987.263µs | ||
| 215 | 2019/01/10 00:38:29 Done ... | ||
| 216 | ``` | ||
| 217 | |||
| 218 | Output of `quote.fa` file contains the encoded DNA sequence in ASCII format. | ||
| 219 | |||
| 220 | ```text | ||
| 221 | >SEQ1 | ||
| 222 | GACAGCTTGTGTACAAGTGTGCTTGCTCGCGAGCGGGTACGCGCGTGGGCTAACAAGTGA | ||
| 223 | GCCAGCAGGTGAACAAGTGTGCGGACAAGCCAGCAGGTGCGCGGACAAGCTGGCGGGTGA | ||
| 224 | ACAAGTGTGCCGGTGAGCCAACAAGCAGACAAGTAAGCAGGTACGCAGGCGAGCTTGTCA | ||
| 225 | ACTCACAAGATCGCTTGTGTACAAGTGTGCGGACAAGCCAGCAGGTGCGCGGACAAGTAT | ||
| 226 | GCTTGCTGGCGGACAAGCCAGCTTGTAAGCGGACAAGCTTGCGCACAAGCTGGCAGGCCT | ||
| 227 | GCCGGCTCGCGTACAAATTCACAAGTAAGTACGCTTGCGTGTACGCGGGTATGTATACTC | ||
| 228 | AACCTCACCAAACGGGACAAGATCGCCGGCGGGCTAGTATACAAGAACGCTTGCCAGTAC | ||
| 229 | AACC | ||
| 230 | ``` | ||
| 231 | |||
| 232 | Then we encode FASTA file from previous operation to encode this data into PNG. | ||
| 233 | |||
| 234 | ```bash | ||
| 235 | ./dnae-png -i quote.fa -o quote.png | ||
| 236 | 2019/01/10 00:40:09 Gathering input file stats ... | ||
| 237 | 2019/01/10 00:40:09 Deconstructing FASTA file ... | ||
| 238 | 2019/01/10 00:40:09 Compositing image file ... | ||
| 239 | 424 / 424 [==================================] 100.00% 0s | ||
| 240 | 2019/01/10 00:40:09 Saving output file ... | ||
| 241 | 2019/01/10 00:40:09 Output image file length is 1.1 kB | ||
| 242 | 2019/01/10 00:40:09 Process took 19.036117ms | ||
| 243 | 2019/01/10 00:40:09 Done ... | ||
| 244 | ``` | ||
| 245 | |||
| 246 | After encoding into PNG format this file looks like this. | ||
| 247 | |||
| 248 |  | ||
| 249 | |||
| 250 | The larger the input stream is the larger the PNG file would be. | ||
| 251 | |||
| 252 | Compiled basic Hello World C program with [GCC](https://www.gnu.org/software/gcc/) would [look like](/files/dna-sequence/sample.png). | ||
| 253 | |||
| 254 | ```c | ||
| 255 | // gcc -O3 -o sample sample.c | ||
| 256 | #include <stdio.h> | ||
| 257 | |||
| 258 | main() { | ||
| 259 | printf("Hello, world!\n"); | ||
| 260 | return 0; | ||
| 261 | } | ||
| 262 | ``` | ||
| 263 | |||
| 264 | ## Toolkit for encoding data | ||
| 265 | |||
| 266 | I have created a toolkit with two main programs: | ||
| 267 | - dnae-encode (encodes file into FASTA file) | ||
| 268 | - dnae-png (encodes FASTA file into PNG) | ||
| 269 | |||
| 270 | Toolkit with full source code is available on [github.com/mitjafelicijan/dna-encoding](https://github.com/mitjafelicijan/dna-encoding). | ||
| 271 | |||
| 272 | ### dnae-encode | ||
| 273 | |||
| 274 | ```bash | ||
| 275 | > ./dnae-encode --help | ||
| 276 | usage: dnae-encode --input=INPUT [<flags>] | ||
| 277 | |||
| 278 | A command-line application that encodes file into DNA sequence. | ||
| 279 | |||
| 280 | Flags: | ||
| 281 | --help Show context-sensitive help (also try --help-long and --help-man). | ||
| 282 | -i, --input=INPUT Input file (ASCII or binary) which will be encoded into DNA sequence. | ||
| 283 | -o, --output="out.fa" Output file which stores DNA sequence in FASTA format. | ||
| 284 | -s, --sequence=SEQ1 The description line (defline) or header/identifier line, gives a name and/or a unique identifier for the sequence. | ||
| 285 | -c, --columns=60 Row characters length (no more than 120 characters). Devices preallocate fixed line sizes in software. | ||
| 286 | --version Show application version. | ||
| 287 | ``` | ||
| 288 | |||
| 289 | ### dnae-png | ||
| 290 | |||
| 291 | ```bash | ||
| 292 | > ./dnae-png --help | ||
| 293 | usage: dnae-png --input=INPUT [<flags>] | ||
| 294 | |||
| 295 | A command-line application that encodes FASTA file into PNG image. | ||
| 296 | |||
| 297 | Flags: | ||
| 298 | --help Show context-sensitive help (also try --help-long and --help-man). | ||
| 299 | -i, --input=INPUT Input FASTA file which will be encoded into PNG image. | ||
| 300 | -o, --output="out.png" Output file in PNG format that represents DNA sequence in graphical way. | ||
| 301 | -s, --size=10 Size of pairings of DNA bases on image in pixels (lower resolution lower file size). | ||
| 302 | --version Show application version. | ||
| 303 | ``` | ||
| 304 | |||
| 305 | ## Benchmarks | ||
| 306 | |||
| 307 | First we generate some binary sample data with dd. | ||
| 308 | |||
| 309 | ```bash | ||
| 310 | dd if=<(openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt < /dev/zero) of=1KB.bin bs=1KB count=1 iflag=fullblock | ||
| 311 | ``` | ||
| 312 | |||
| 313 | Our freshly generated 1KB file looks something like this (its full of garbage data as intended). | ||
| 314 | |||
| 315 |  | ||
| 316 | |||
| 317 | We create following binary files: | ||
| 318 | - 1KB.bin | ||
| 319 | - 10KB.bin | ||
| 320 | - 100KB.bin | ||
| 321 | - 1MB.bin | ||
| 322 | - 10MB.bin | ||
| 323 | - 100MB.bin | ||
| 324 | |||
| 325 | After this we create FASTA files for all the binary files by encoding them into DNA sequence. | ||
| 326 | |||
| 327 | ```bash | ||
| 328 | ./dnae-encode -i 100MB.bin -o 100MB.fa | ||
| 329 | ``` | ||
| 330 | |||
| 331 | Then we GZIP all the FASTA files to see how much the can be compressed. | ||
| 332 | |||
| 333 | ```bash | ||
| 334 | gzip -9 < 10MB.fa > 10MB.fa.gz | ||
| 335 | ``` | ||
| 336 | |||
| 337 | [Download ODS file with benchmarks](/files/dna-sequence/benchmarks.ods). | ||
| 338 | |||
| 339 | ## References | ||
| 340 | |||
| 341 | [^1]: https://www.techopedia.com/definition/948/encoding | ||
| 342 | [^2]: https://www.dna-worldwide.com/resource/160/history-dna-timeline | ||
| 343 | [^3]: https://opentextbc.ca/biology/chapter/9-1-the-structure-of-dna/ | ||
| 344 | [^4]: https://arxiv.org/abs/1801.04774 | ||
| 345 | [^5]: https://en.wikipedia.org/wiki/FASTA_format | ||
diff --git a/src/research/using-digitalocean-spaces-object-storage-with-fuse.md b/src/research/using-digitalocean-spaces-object-storage-with-fuse.md new file mode 100644 index 0000000..099fbef --- /dev/null +++ b/src/research/using-digitalocean-spaces-object-storage-with-fuse.md | |||
| @@ -0,0 +1,260 @@ | |||
| 1 | title: Using DigitalOcean Spaces Object Storage with FUSE | ||
| 2 | date: 2018-01-16 | ||
| 3 | tags: research | ||
| 4 | hide: false | ||
| 5 | ---- | ||
| 6 | |||
| 7 | Couple of months ago [DigitalOcean](https://www.digitalocean.com) introduced new product called [Spaces](https://blog.digitalocean.com/introducing-spaces-object-storage/) which is Object Storage very similar to Amazon's S3. This really peaked my interest, because this was something I was missing and even the thought of going over the internet for such functionality was in no interest to me. Also in fashion with their previous pricing this also is very cheap and pricing page is a no-brainer compared to AWS or GCE. [Prices are clearly and precisely defined and outlined](https://www.digitalocean.com/pricing/). You must love them for that :) | ||
| 8 | |||
| 9 | ### Initial requirements | ||
| 10 | |||
| 11 | * Is it possible to use them as a mounted drive with FUSE? (tl;dr YES) | ||
| 12 | * Will the performance degrade over time and over different sizes of objects? (tl;dr NO&YES) | ||
| 13 | * Can storage be mounted on multiple machines at the same time and be writable? (tl;dr YES) | ||
| 14 | |||
| 15 | > Let me be clear. This scripts I use are made just for benchmarking and are not intended to be used in real-life situations. Besides that, I am looking into using this approaches but adding caching service in front of it and then dumping everything as an object to storage. This could potentially be some interesting post of itself. But in case you would need real-time data without eventual consistency please take this scripts as they are: not usable in such situations. | ||
| 16 | |||
| 17 | ## Is it possible to use them as a mounted drive with FUSE? | ||
| 18 | |||
| 19 | Well, actually they can be used in such manor. Because they are similar to [AWS S3](https://aws.amazon.com/s3/) many tools are available and you can find many articles and [Stackoverflow items](https://stackoverflow.com/search?q=s3+fuse). | ||
| 20 | |||
| 21 | To make this work you will need DigitalOcean account. If you don't have one you will not be able to test this code. But if you have an account then you go and [create new Droplet](https://cloud.digitalocean.com/droplets/new?size=s-1vcpu-1gb®ion=ams3&distro=debian&distroImage=debian-9-x64&options=private_networking,install_agent). If you click on this link you will already have preselected Debian 9 with smallest VM option. | ||
| 22 | |||
| 23 | * Please be sure to add you SSH key, because we will login to this machine remotely. | ||
| 24 | * If you change your region please remember which one you choose because we will need this information when we try to mount space to our machine. | ||
| 25 | |||
| 26 | Instuctions on how to use SSH keys and how to setup them are available in article [How To Use SSH Keys with DigitalOcean Droplets](https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets). | ||
| 27 | |||
| 28 |  | ||
| 29 | |||
| 30 | After we created Droplet it's time to create new Space. This is done by clicking on a button [Create](https://cloud.digitalocean.com/spaces/new) (right top corner) and selecting Spaces. Choose pronounceable ```Unique name``` because we will use it in examples below. You can either choose Private or Public, it doesn't matter in our case. And you can always change that in the future. | ||
| 31 | |||
| 32 | When you have created new Space we should [generate Access key](https://cloud.digitalocean.com/settings/api/tokens). This link will guide to the page when you can generate this key. After you create new one, please save provided Key and Secret because Secret will not be shown again. | ||
| 33 | |||
| 34 |  | ||
| 35 | |||
| 36 | Now that we have new Space and Access key we should SSH into our machine. | ||
| 37 | |||
| 38 | ```bash | ||
| 39 | # replace IP with the ip of your newly created droplet | ||
| 40 | ssh root@IP | ||
| 41 | |||
| 42 | # this will install utilities for mounting storage objects as FUSE | ||
| 43 | apt install s3fs | ||
| 44 | |||
| 45 | # we now need to provide credentials (access key we created earlier) | ||
| 46 | # replace KEY and SECRET with your own credentials but leave the colon between them | ||
| 47 | # we also need to set proper permissions | ||
| 48 | echo "KEY:SECRET" > .passwd-s3fs | ||
| 49 | chmod 600 .passwd-s3fs | ||
| 50 | |||
| 51 | # now we mount space to our machine | ||
| 52 | # replace UNIQUE-NAME with the name you choose earlier | ||
| 53 | # if you choose different region for your space be careful about -ourl option (ams3) | ||
| 54 | s3fs UNIQUE-NAME /mnt/ -ourl=https://ams3.digitaloceanspaces.com -ouse_cache=/tmp | ||
| 55 | |||
| 56 | # now we try to create a file | ||
| 57 | # once you mount it may take a couple of seconds to retrieve data | ||
| 58 | echo "Hello cruel world" > /mnt/hello.txt | ||
| 59 | ``` | ||
| 60 | |||
| 61 | After all this you can return to your browser and go to [DigitalOcean Spaces](https://cloud.digitalocean.com/spaces) and click on your created space. If file hello.txt is present you have successfully mounted space to your machine and wrote data to it. | ||
| 62 | |||
| 63 | I choose the same region for my Droplet and my Space but you don't have to. You can have different regions. What this actually does to performance I don't know. | ||
| 64 | |||
| 65 | Additional information on FUSE: | ||
| 66 | |||
| 67 | * [Github project page for s3fs](https://github.com/s3fs-fuse/s3fs-fuse) | ||
| 68 | * [FUSE - Filesystem in Userspace](https://en.wikipedia.org/wiki/Filesystem_in_Userspace) | ||
| 69 | |||
| 70 | ## Will the performance degrade over time and over different sizes of objects? | ||
| 71 | |||
| 72 | For this task I didn't want to just read and write text files or uploading images. I actually wanted to figure out if using something like SQlite is viable in this case. | ||
| 73 | |||
| 74 | ### Measurement experiment 1: File copy | ||
| 75 | |||
| 76 | ```bash | ||
| 77 | # first we create some dummy files at different sizes | ||
| 78 | dd if=/dev/zero of=10KB.dat bs=1024 count=10 #10KB | ||
| 79 | dd if=/dev/zero of=100KB.dat bs=1024 count=100 #100KB | ||
| 80 | dd if=/dev/zero of=1MB.dat bs=1024 count=1024 #1MB | ||
| 81 | dd if=/dev/zero of=10MB.dat bs=1024 count=10240 #10MB | ||
| 82 | |||
| 83 | # now we set time command to only return real | ||
| 84 | TIMEFORMAT=%R | ||
| 85 | |||
| 86 | # now lets test it | ||
| 87 | (time cp 10KB.dat /mnt/) |& tee -a 10KB.results.txt | ||
| 88 | |||
| 89 | # and now we automate | ||
| 90 | # this will perform the same operation 100 times | ||
| 91 | # this will output results into separated files based on objecty size | ||
| 92 | n=0; while (( n++ < 100 )); do (time cp 10KB.dat /mnt/10KB.$n.dat) |& tee -a 10KB.results.txt; done | ||
| 93 | n=0; while (( n++ < 100 )); do (time cp 100KB.dat /mnt/100KB.$n.dat) |& tee -a 100KB.results.txt; done | ||
| 94 | n=0; while (( n++ < 100 )); do (time cp 1MB.dat /mnt/1MB.$n.dat) |& tee -a 1MB.results.txt; done | ||
| 95 | n=0; while (( n++ < 100 )); do (time cp 10MB.dat /mnt/10MB.$n.dat) |& tee -a 10MB.results.txt; done | ||
| 96 | ``` | ||
| 97 | |||
| 98 | Files of size 100MB were not successfully transferred and ended up displaying error (cp: failed to close '/mnt/100MB.1.dat': Operation not permitted). | ||
| 99 | |||
| 100 | As I suspected, object size is not really that important. Sadly I don't have the time to test performance over periods of time. But if some of you would do it please send me your data. I would be interested in seeing results. | ||
| 101 | |||
| 102 | **Here are plotted results** | ||
| 103 | |||
| 104 | You can download [raw result here](/files/do-fuse/copy-benchmarks.tsv). Measurements are in seconds. | ||
| 105 | |||
| 106 | <script src="//cdn.plot.ly/plotly-latest.min.js"></script> | ||
| 107 | <div id="copy-benchmarks"></div> | ||
| 108 | <script> | ||
| 109 | (function(){ | ||
| 110 | var request = new XMLHttpRequest(); | ||
| 111 | request.open("GET", "/files/do-fuse/copy-benchmarks.tsv", true); | ||
| 112 | request.onload = function() { | ||
| 113 | if (request.status >= 200 && request.status < 400) { | ||
| 114 | var payload = request.responseText.trim(); | ||
| 115 | var tsv = payload.split("\n"); | ||
| 116 | for (var i=0; i<tsv.length; i++) { tsv[i] = tsv[i].split("\t"); } | ||
| 117 | var traces = []; | ||
| 118 | var headers = tsv[0]; | ||
| 119 | tsv.shift(); | ||
| 120 | Array.prototype.forEach.call(headers, function(el, idx) { | ||
| 121 | var x = []; | ||
| 122 | var y = []; | ||
| 123 | for (var j=0; j<tsv.length; j++) { | ||
| 124 | x.push(j); | ||
| 125 | y.push(parseFloat(tsv[j][idx].replace(",", "."))); | ||
| 126 | } | ||
| 127 | traces.push({ x: x, y: y, type: "scatter", name: el, line: { width: 1, shape: "spline" } }); | ||
| 128 | }); | ||
| 129 | var copy = Plotly.newPlot("copy-benchmarks", traces, { legend: {"orientation": "h"}, height: 400, margin: { l: 40, r: 0, b: 20, t: 30, pad: 0 }, yaxis: { title: "execution time in seconds", titlefont: { size: 12 } }, xaxis: { title: "fn(i)", titlefont: { size: 12 } } }); | ||
| 130 | } else { } | ||
| 131 | }; | ||
| 132 | request.onerror = function() { }; | ||
| 133 | request.send(null); | ||
| 134 | })(); | ||
| 135 | </script> | ||
| 136 | |||
| 137 | As far as these tests show, performance is quite stable and can be predicted which is fantastic. But this is a small test and spans only over couple of hours. So you should not completely trust them. | ||
| 138 | |||
| 139 | ### Measurement experiment 2: SQLite performanse | ||
| 140 | |||
| 141 | I was unable to use database file directly from mounted drive so this is a no-go as I suspected. So I executed code below on a local disk just to get some benchmarks. I inserted 1000 records with DROPTABLE, CREATETABLE, INSERTMANY, FETCHALL, COMMIT for 1000 times to generate statistics. As you can see performance of SQLite is quite amazing. You could then potentially just copy file to mounted drive and be done with it. | ||
| 142 | |||
| 143 | ```python | ||
| 144 | import time | ||
| 145 | import sqlite3 | ||
| 146 | import sys | ||
| 147 | |||
| 148 | if len(sys.argv) < 3: | ||
| 149 | print("usage: python sqlite-benchmark.py DB_PATH NUM_RECORDS REPEAT") | ||
| 150 | exit() | ||
| 151 | |||
| 152 | def data_iter(x): | ||
| 153 | for i in range(x): | ||
| 154 | yield "m" + str(i), "f" + str(i*i) | ||
| 155 | |||
| 156 | header_line = "%s\t%s\t%s\t%s\t%s\n" % ("DROPTABLE", "CREATETABLE", "INSERTMANY", "FETCHALL", "COMMIT") | ||
| 157 | with open("sqlite-benchmarks.tsv", "w") as fp: | ||
| 158 | fp.write(header_line) | ||
| 159 | |||
| 160 | start_time = time.time() | ||
| 161 | conn = sqlite3.connect(sys.argv[1]) | ||
| 162 | c = conn.cursor() | ||
| 163 | end_time = time.time() | ||
| 164 | result_time = CONNECT = end_time - start_time | ||
| 165 | print("CONNECT: %g seconds" % (result_time)) | ||
| 166 | |||
| 167 | start_time = time.time() | ||
| 168 | c.execute("PRAGMA journal_mode=WAL") | ||
| 169 | c.execute("PRAGMA temp_store=MEMORY") | ||
| 170 | c.execute("PRAGMA synchronous=OFF") | ||
| 171 | result_time = PRAGMA = end_time - start_time | ||
| 172 | print("PRAGMA: %g seconds" % (result_time)) | ||
| 173 | |||
| 174 | for i in range(int(sys.argv[3])): | ||
| 175 | print("#%i" % (i)) | ||
| 176 | |||
| 177 | start_time = time.time() | ||
| 178 | c.execute("drop table if exists test") | ||
| 179 | end_time = time.time() | ||
| 180 | result_time = DROPTABLE = end_time - start_time | ||
| 181 | print("DROPTABLE: %g seconds" % (result_time)) | ||
| 182 | |||
| 183 | start_time = time.time() | ||
| 184 | c.execute("create table if not exists test(a,b)") | ||
| 185 | end_time = time.time() | ||
| 186 | result_time = CREATETABLE = end_time - start_time | ||
| 187 | print("CREATETABLE: %g seconds" % (result_time)) | ||
| 188 | |||
| 189 | start_time = time.time() | ||
| 190 | c.executemany("INSERT INTO test VALUES (?, ?)", data_iter(int(sys.argv[2]))) | ||
| 191 | end_time = time.time() | ||
| 192 | result_time = INSERTMANY = end_time - start_time | ||
| 193 | print("INSERTMANY: %g seconds" % (result_time)) | ||
| 194 | |||
| 195 | start_time = time.time() | ||
| 196 | c.execute("select count(*) from test") | ||
| 197 | res = c.fetchall() | ||
| 198 | end_time = time.time() | ||
| 199 | result_time = FETCHALL = end_time - start_time | ||
| 200 | print("FETCHALL: %g seconds" % (result_time)) | ||
| 201 | |||
| 202 | start_time = time.time() | ||
| 203 | conn.commit() | ||
| 204 | end_time = time.time() | ||
| 205 | result_time = COMMIT = end_time - start_time | ||
| 206 | print("COMMIT: %g seconds" % (result_time)) | ||
| 207 | |||
| 208 | |||
| 209 | log_line = "%f\t%f\t%f\t%f\t%f\n" % (DROPTABLE, CREATETABLE, INSERTMANY, FETCHALL, COMMIT) | ||
| 210 | with open("sqlite-benchmarks.tsv", "a") as fp: | ||
| 211 | fp.write(log_line) | ||
| 212 | |||
| 213 | start_time = time.time() | ||
| 214 | conn.close() | ||
| 215 | end_time = time.time() | ||
| 216 | result_time = CLOSE = end_time - start_time | ||
| 217 | print("CLOSE: %g seconds" % (result_time)) | ||
| 218 | ``` | ||
| 219 | |||
| 220 | You can download [raw result here](/files/do-fuse/sqlite-benchmarks.tsv). And again, these results are done on a local block storage and do not represent capabilities of object storage. With my current approach and state of the test code these can not be done. I would need to make Python code much more robust and check locking etc. | ||
| 221 | |||
| 222 | <div id="sqlite-benchmarks"></div> | ||
| 223 | <script> | ||
| 224 | (function(){ | ||
| 225 | var request = new XMLHttpRequest(); | ||
| 226 | request.open("GET", "/files/do-fuse/sqlite-benchmarks.tsv", true); | ||
| 227 | request.onload = function() { | ||
| 228 | if (request.status >= 200 && request.status < 400) { | ||
| 229 | var payload = request.responseText.trim(); | ||
| 230 | var tsv = payload.split("\n"); | ||
| 231 | for (var i=0; i<tsv.length; i++) { tsv[i] = tsv[i].split("\t"); } | ||
| 232 | var traces = []; | ||
| 233 | var headers = tsv[0]; | ||
| 234 | tsv.shift(); | ||
| 235 | Array.prototype.forEach.call(headers, function(el, idx) { | ||
| 236 | var x = []; | ||
| 237 | var y = []; | ||
| 238 | for (var j=0; j<tsv.length; j++) { | ||
| 239 | x.push(j); | ||
| 240 | y.push(parseFloat(tsv[j][idx].replace(",", "."))); | ||
| 241 | } | ||
| 242 | traces.push({ x: x, y: y, type: "scatter", name: el, line: { width: 1, shape: "spline" } }); | ||
| 243 | }); | ||
| 244 | var sqlite = Plotly.newPlot("sqlite-benchmarks", traces, { legend: {"orientation": "h"}, height: 400, margin: { l: 50, r: 0, b: 20, t: 30, pad: 0 }, yaxis: { title: "execution time in seconds", titlefont: { size: 12 } } }); | ||
| 245 | } else { } | ||
| 246 | }; | ||
| 247 | request.onerror = function() { }; | ||
| 248 | request.send(null); | ||
| 249 | })(); | ||
| 250 | </script> | ||
| 251 | |||
| 252 | ## Can storage be mounted on multiple machines at the same time and be writable? | ||
| 253 | |||
| 254 | Well, this one didn't take long to test. And the answer is **YES**. I mounted space on both machines and measured same performance on both machines. But because file is downloaded before write and then uploaded on complete there could potentially be problems is another process is trying to access the same file. | ||
| 255 | |||
| 256 | ## Observations and conslusion | ||
| 257 | |||
| 258 | Using Spaces in this way makes it easier to access and manage files. But besides that you would need to write additional code to make this one play nice with you applications. | ||
| 259 | |||
| 260 | Nevertheless, this was extremely simple to setup and use and this is just another excellent product in DigitalOcean product line. I found this exercise very valuable and am thinking about implementing some sort of mechanism for SQLite, so data can be stored on Spaces and accessed by many VM's. For a project where data doesn't need to be accessible in real-time and can have couple of minutes old data this would be very interesting. If any of you find this proposal interesting please write in a comment box below or shoot me an email and I will keep you posted. | ||
diff --git a/src/static/avatar-512x512.png b/src/static/avatar-512x512.png new file mode 100644 index 0000000..fc34eee --- /dev/null +++ b/src/static/avatar-512x512.png | |||
| Binary files differ | |||
diff --git a/src/static/avatar-64x64.png b/src/static/avatar-64x64.png new file mode 100644 index 0000000..1406f46 --- /dev/null +++ b/src/static/avatar-64x64.png | |||
| Binary files differ | |||
diff --git a/src/static/style.css b/src/static/style.css new file mode 100644 index 0000000..efb65c0 --- /dev/null +++ b/src/static/style.css | |||
| @@ -0,0 +1,116 @@ | |||
| 1 | body { | ||
| 2 | line-height: 150%; | ||
| 3 | margin-bottom: 100px; | ||
| 4 | } | ||
| 5 | |||
| 6 | main { | ||
| 7 | max-width: 680px; | ||
| 8 | padding: 20px 30px; | ||
| 9 | } | ||
| 10 | |||
| 11 | nav { | ||
| 12 | margin-bottom: 50px; | ||
| 13 | } | ||
| 14 | |||
| 15 | nav a { | ||
| 16 | display: inline-block; | ||
| 17 | margin-right: 20px; | ||
| 18 | } | ||
| 19 | |||
| 20 | h1 { | ||
| 21 | font-size: 280%; | ||
| 22 | line-height: initial; | ||
| 23 | } | ||
| 24 | |||
| 25 | h2 { | ||
| 26 | font-size: 200%; | ||
| 27 | line-height: initial; | ||
| 28 | } | ||
| 29 | |||
| 30 | h3 { | ||
| 31 | font-size: 160%; | ||
| 32 | line-height: initial; | ||
| 33 | } | ||
| 34 | |||
| 35 | img { | ||
| 36 | max-width: 100%; | ||
| 37 | margin: 30px auto; | ||
| 38 | display: block; | ||
| 39 | } | ||
| 40 | |||
| 41 | ul.article-list li { | ||
| 42 | margin-bottom: 10px; | ||
| 43 | } | ||
| 44 | |||
| 45 | ul.article-list time { | ||
| 46 | display: inline-block; | ||
| 47 | min-width: 120px; | ||
| 48 | } | ||
| 49 | |||
| 50 | article .info { | ||
| 51 | font-style: oblique; | ||
| 52 | } | ||
| 53 | |||
| 54 | pre { | ||
| 55 | overflow: auto; | ||
| 56 | } | ||
| 57 | |||
| 58 | table { | ||
| 59 | width: 100%; | ||
| 60 | } | ||
| 61 | |||
| 62 | table, th, td { | ||
| 63 | border: 1px solid black; | ||
| 64 | text-align: left; | ||
| 65 | } | ||
| 66 | |||
| 67 | th, td { | ||
| 68 | padding: 5px 10px; | ||
| 69 | } | ||
| 70 | |||
| 71 | ::selection { | ||
| 72 | background: #ff0; | ||
| 73 | color: #000; | ||
| 74 | } | ||
| 75 | |||
| 76 | ::-moz-selection { | ||
| 77 | background: #ff0; | ||
| 78 | color: #000; | ||
| 79 | } | ||
| 80 | |||
| 81 | @media only screen and (max-width:480px) { | ||
| 82 | nav { | ||
| 83 | text-align: center; | ||
| 84 | margin-bottom: initial; | ||
| 85 | } | ||
| 86 | |||
| 87 | nav a { | ||
| 88 | margin-bottom: 10px; | ||
| 89 | } | ||
| 90 | |||
| 91 | ul.article-list { | ||
| 92 | padding-left: 20px; | ||
| 93 | |||
| 94 | } | ||
| 95 | |||
| 96 | ul.article-list li { | ||
| 97 | margin-bottom: 20px; | ||
| 98 | |||
| 99 | } | ||
| 100 | |||
| 101 | ul.article-list a { | ||
| 102 | display: block; | ||
| 103 | } | ||
| 104 | |||
| 105 | h1 { | ||
| 106 | font-size: 220%; | ||
| 107 | } | ||
| 108 | |||
| 109 | h2 { | ||
| 110 | font-size: 180%; | ||
| 111 | } | ||
| 112 | |||
| 113 | h3 { | ||
| 114 | font-size: 160%; | ||
| 115 | } | ||
| 116 | } | ||
