~schnouki/watch_tabnine

A daemon to ensure that TabNine doesn't eat all your memory
77c05df3 — Thomas Jost 1 year, 5 months ago
Don't crash when processes change too fast
bfb802b4 — Thomas Jost 1 year, 5 months ago
Add systemd service and Makefile install target
40769112 — Thomas Jost 1 year, 5 months ago
Add one-shot mode

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~schnouki/watch_tabnine
read/write
git@git.sr.ht:~schnouki/watch_tabnine

You can also use your local clone with git send-email.

#watch_tabnine

builds.sr.ht status

watch_tabnine is a lightweight daemon that ensures that TabNine doesn't eat all your memory by checking its memory consumption at regular intervals and killing it when it becomes too big.

watch_tabnine is written in the D programming language. No particular reason, it's just that I'm learning it, and needed this tool anyway. By design, it only runs on Linux.

#Download

At the moment there is no pre-built binary: you need to compile this yourself.

  1. Install a D compiler (tested with DMD and LDC2)

  2. Clone this repository:

     git clone https://git.sr.ht/~schnouki/watch_tabnine
    
  3. Build it:

     make          # If using DMD
     make DC=ldc2  # If using LDC2
    
  4. Run it:

     ./watch_tabnine
    
  5. Optional: install it

     sudo make install PREFIX=/usr/local
    
  6. Optional: after installing it, run it through systemd:

     sudo sytemctl daemon-reload
     sudo systemctl enable --now watch_tabnine
    

#Usage

watch_tabnine supports several command line options:

  • -n, --name: name of the TabNine executable (default: TabNine)
  • -m, --mem: max allowed memory in MB (default: 250 MB)
  • -s, --swap: max allowed swap in MB (default: 100 MB)
  • -w, --wait: delay between each check in seconds (default: 30s)
  • -1, --once: only run once

#License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

#Contributing

  1. Clone it
  2. Create a new branch (git checkout -b feature/foo_bar or git checkout -b bugfix/fix_foo_bar)
  3. Commit your changes
  4. Email me your changes using git send-email at schnouki %at% schnouki.net

#Contact

Questions, feedback? You can either email me (schnouki %at% schnouki.net%) or ping me on Twitter (@Schnouki).