Code Monkey home page Code Monkey logo

metrics's Introduction

Kiwix

Kiwix is an offline reader for Web content. It's especially thought to make Wikipedia available offline. This is done by reading the content of the project stored in a file format ZIM, a high compressed open format with additional meta-data.

COMPILATION INSTRUCTIONS

Take care, the paragraphs are about the target platforms. If you want to build Kiwix for Android on a GNU/Linux system, you should follow the instructions of the "Android" paragraph.

GNU/Linux

Install pre-requisties in your distro, eg, in Debian based:

sudo apt-get install zip pkg-config aptitude
sudo apt-get install libmagic-dev
sudo aptitude install libtool automake

Static (Probably what you need to do if you don't know)

Kiwix uses shared libraries only. A static build of Kiwix is a build which packages the dependencies. Command line tools (indexer, server, etc) are compiled statically.

Run automake

./autogen.sh

Run autoconf

./configure --enable-compileall --enable-staticbins --disable-android;

Download all dependencies

cd src/dependencies;
make;
cd ../..;

Reconfigure with dependencies (Gecko version)

./configure --enable-compileall --enable-staticbins --disable-android;

Compile

make;

Creates tarbal suitable for distribution (no deps)

make diststatic
  • If you want to be able to run directly from your dev repository copy the "xulrunner" directory in the distributation tarball to the "kiwix" sub-directory of your developement tree.

  • Don't try to install with "make install", if you want to have kiwix install on your system just copy the directory in a /usr/local/bin directory.

Dynamic

GNU/Linux build uses shared libraries by default. You will need the following dependencies (also -dev packages) to compile Kiwix for Linux (this list can vary a little bit depending of the GNU/Linux distribution):

  • g++
  • gcc
  • autoconf
  • automake
  • libtool
  • pkg-config
  • liblzma
  • libicu
  • libmicrohttpd
  • zlib
  • libcrypto++
  • cmake
  • wget
  • aria2
  • libuuid
  • libssl
  • libzim
  • libpugixml
  • libctpp2
  • xulrunner

Debian is the only distribution providing natively all these packages. Ubuntu provides most of them, excluding xulrunner and zimlib. You will have to download and install them separatly or run configure --with-static-dep=SELF. Then run the following commands:

Run automake

./autogen.sh;

Configure the compilation check --help for options. Most dependencies accept --with-dep=XX and with-static-dep=XX.a. Static version of libraries are used for building static binaries (server, indexer, etc) Use --with-dep=SELF or --with-static-dep=SELF to trigger fetch and build for the dependency.

./configure;

Compile

make;

Optionaly install on the filesystem

sudo make install;

Mac OSX Universal

WARNING: To build the Mac OS version you will have to install proprietary software which are free of charge. You will also need to build on an Apple Mac computer.

Configure Macports

Install the following tools and libraries

sudo port install autogen +universal pkgconfig +universal wget +universal gmake +universal coreutils +universal libidl +universal autoconf213 +universal icu +universal;

NOTE: the following commands seem to work better on OS X Yosemite, apparently 'universal' is less relevant and various packages are no longer available as universal options.

sudo port  install autogen pkgconfig  wget  gmake  coreutils  libidl  autoconf213  icu;
sudo port -v install aclocal automake libtool autoconf cmake imagemagick
./autogen.sh alt && ./configure --enable-compileall;
cd src/dependencies && make;
make clean;
./autogen.sh alt && ./configure --enable-compileall --enable-compileall --disable-dependency-tracking --with-target-arch=i386;
make;
make distmac;
make clean;
./autogen.sh alt && ./configure --enable-compileall --enable-compileall --disable-dependency-tracking --with-target-arch=x86_64;
make;
make distmac;
make universal;
Debugging tips:
  • components file type can be either Mach-O dynamically linked shared library or Mach-O bundle but above instructions will create dynamic libraries.
  • Shared Object (.so files on Linux) have .dylib extension on OSX.
  • use dtruss to inspect program execution like strace.
  • dyldinfo -lazy_bind | dyldinfo -bind components/zimAccessor.dylib |grep zim
  • nm -gm components/zimAccessor.dylib | nm -u | nm -g
  • otool -L libzim.dylib
  • install_name_tool -change @executable_path/../libicuuc.dylib libicuuc.dylib kiwix-serve
  • lldb

Android

Look at android/README

Windows

  • Install Windows XP SP2+

  • Install Visual Studio Express 2010

  • Install 7-zip

  • Install MozillaBuild 1.6

  • Install ActivePerl

  • Install Ruby

  • Install NSIS 2.46

  • Install nsis_locate

  • Install nsis_uac

  • Replace installed UAC.dll by new one.

  • Install all software in default locations.

  • Change your Windows PATH environment variable:

    • 7zip
    • NSIS
    • ruby
    • Perl
    • mozilla-build\msys\bin\
  • Get shell from c:\mozilla-build\start-msvc10.bat

mkdir -p /c/slave/windows-32b
git clone git://git.code.sf.net/p/kiwix/kiwix kiwix
cd kiwix
./autogen.sh alt
./configure --disable-indexer --enable-jar
make win
make windist
make wininstaller

Contact

Email: [email protected] or [email protected]

Jabber: [email protected]

IRC: #kiwix on irc.freenode.net

You can use IRC web interface on http://chat.kiwix.org/

More... http://www.kiwix.org/wiki/Communication

LEGAL & DISCLAIMER

Read 'COPYING' file

metrics's People

Contributors

florentk avatar kelson42 avatar popolechien avatar rgaudin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

metrics's Issues

Add Number defined tags in the dashboard

Git backend of GrimoireELK do not set the "tags". We need to modify it to allow to create the new visualization " Number defined tags".

Copy item['data']['defs'] to eitem in grimoire_elk/enriched/git.py:get_rich_item

X axis granularity is not the best

It seems the default duration of any point on the X axis is not optimal. Charts display a lot of points/bars because this point (duration) is really short. This is difficult to read the charts because of this.

It seems to display a day (even if I believe this an aggreate of values over many days). I don't think having more than 20-30 values on the X axis makes a lot of sense. To me depending of the overall period selected, we should display days/weeks/months smartly (but maybe we choose have somehow a chooser)? Or do we have an alternative approach?

Backlog : Allows filter by label

To support filter by label, we need to enhance backlog studie : compute the average for each repos and for Bug and Enhancement label.

As a label can be defined multiple times, we need to define priority : if Bug and Enhancement are define, considere is Bug.

Implement Dashboard with following KPI

KPIS:

  • Size of the backlog (number of tickets with the status open, differentiation of label "bug" from other)
  • Number of tickets opened and closed
  • Size of of code base in lines with (differentiation per language)
  • Number of lines commited (differenciation per contributor)
  • Number of code contributors/committers (in the last period)
  • Average to ticket time to solve (differenciation bugs from others)
  • Number of ticket participants
  • Number of releases (in the last period)

Remarks:

  • All the stats are over time (period of 1 days or 1 month, ...) in x axis.
  • This KPIs are global (all openzim+kiwix repos together), but each KPI should be computable for one or many selected repos.

25 november

Allow to add new "visualisations" in docker image (needed for new KPIs)
Allow to init Overviews panel on container creation from a config file
Create a new "overview" panel with first KPIs:

  • Size of backlog
  • Number of tickets opened and closed
  • Average to ticket time to solve
  • Number of added line & removed lines

9 december

Integrate Graal to docker image
Add the KPI "Size of code base in lines" to owerview panel

16 december

Add other KPIs :

  • Number of code contributors/committers
  • Number of ticket authors
  • Number defined tags

23 december

Allow to easily use the panel interface to choose differentiation :

  • code language
  • label (bug, enhancement ...)
  • organisation (kiwix/openzim)
  • contributor
  • period

Use a year as default time scale

Current chart default period seems to be last two years. I think last 12 (a year) should be better in an attempt to reduce the number of of information and focus on the essential.

Use own Dockerfile-full

To add studies in grimoire-elk, I modified files in grimoire-elk repos, then I have fork this repos. To use this fork in docker file, I must to use the build_grimoirelab modified script and re-build full docker image. We choose to rewrite our own Dockerfile instead a Dockerfile based on grimoirelab/full image.

Tune "Average time to solve"

  • Title should be "Time to solve"
  • Y axis legend should "Average tickets lifetime (days)"
  • Colors should be like in chart "Backlog size"
  • Same bars as "Backlog size" should be used".

To evolve Docker image to integrating Graal module

https://github.com/chaoss/grimoirelab-graal is a Generic Repository AnALyzer for Grimoirelab. He uses among other things coloc or lizard tools.

The actual docker don't include the Graal integration but a first version of this integration is proposed as a fork here (see docker subdirectory) based on the work of inishchith at Google Summer of code 2019.

Graal integration allow to add a new dashboard to show metric :

  • Total line of code (LOC)
  • Total line of comment
  • Total number of function
  • Code complexity
  • Comments per LOC
  • LOC per function
  • Statistics on file extension

Export a chart in a picture

svg or png. That would really help to share charts. Would Kibana allow such an option? We have exports in CSV already.

Tunes "Number of tickets opened and closed"

  • Legend should be "opened" and "closed"
  • Colors should be the same as on Github for an open (green) and closed (red) ticket
  • Y axis legend should be "Number of tickets"
  • I want things displayes in a form of curves
  • A third "ratio" curve in black should show the opened - closed (so can be negative)

Tune "Size of backlog" chart

The numbers are more realistic now. Here a re few things I would like to do:

Then we should be good I guess with that chart.

metrics.kiwix.org down

I have configured HTTPs on Sloppy and restart the container... and now no content is available at all.

Average time to solve does not look coherent.

A picture is worth a thousand words, they say:
Capture d’écran 2019-12-09 à 15 06 34

Also, we've been solving a lot more tickets recently (particularly on android) which should mechanically drag that average down. But not create a trough.

What does q.* > count mean

On Metrics.kiwix.org I'm currently looking at the Size of backlog chart and I have no idea what 600 is. But we're between it and 500.

"Size of backlog" is wrong

If I show a chart only over the last two years, the current value is around 500 but if I configure the chart to look over the past 5 years then it show around 1000 tickets. This has to be wrong, it should always display the same amount of ticket with the status open at a certain date.

[Cocom] Analysis fail with some repositories

I got this error :

2019-12-31 17:40:08 > 2019-12-31 16:40:05,843 - grimoire_elk.elk - ERROR - Error enriching ocean from cocom (https://github.com/kiwix/tools): 'message'
2019-12-31 17:40:08 > Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/grimoire_elk/elk.py", line 672, in enrich_backend
    enrich_count = enrich_items(ocean_backend, enrich_backend)
  File "/usr/local/lib/python3.5/dist-packages/grimoire_elk/elk.py", line 452, in enrich_items
    total = enrich_backend.enrich_items(ocean_backend)
  File "/usr/local/lib/python3.5/dist-packages/grimoire_elk/enriched/cocom.py", line 223, in enrich_items
    rich_items = self.get_rich_items(item)
  File "/usr/local/lib/python3.5/dist-packages/grimoire_elk/enriched/cocom.py", line 183, in get_rich_items
    eitem['message'] = entry['message']
2019-12-31 17:40:08 > KeyError: 'message'

with theses repository :

Tune "Total lines of code"

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.