Skip to content

Aerodrome Service Hours - displays aerodrome service hours read from notamn records

Notifications You must be signed in to change notification settings

thomasnal/aerodrome_service_hours

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aerodrome Service Hours

Description

This is a Ruby on Rails application that displays list of aerodrome service hours. Input is provided by posting an input text file through the form.

Installation

git clone http://github.com/thomasnal/aerodrome_service_hours

Run

rails s

Open the browser and navigate to localhost.

Run performance comparison test

rake test:benchmark

This is a comparison of Parser vs ParserPlain model. ParserPlain is a plain, one method, regular expression version of the parser. The test runs on 30000 Notamn records made of notamn3.in input file.

Sample input

test/fixtures/input/notamn3.in

Screenshot

Machine code compiled Ruby source

I investigated performance of the ruby code compiled into machine code. The processing time gets more than halved therefore considerably increasing performance comparing to Ruby interpreter.

apt-get install crystal
cd $(PROJECT_ROOT)/vendor/crystal
crystal build parser.cr --release
./parser

To run side by side benchmarks of machine code vs interpreted by Ruby,

./notamn_in_prep.sh # to build input file
./parser
ruby parser.rb

Sample result,

Hello Crystal
  0.003342   0.000076   0.003418 (  2.053490)
Number of notamns: 20001

Hello Ruby
  4.530000   0.070000   4.600000 (  4.617555)
Number of notamns: 20001

(Beware, to achieve this performance use the Crystal working copy or a newer version than 0.12 once released. Bug in StringScanner decreases performance.)

crystal-lang.org/

About

Aerodrome Service Hours - displays aerodrome service hours read from notamn records

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published