Giter VIP home page Giter VIP logo

howlong's People

Contributors

aniketrege avatar arafsheikh avatar codetriage-readme-bot avatar flyingpot avatar harshtheworkman avatar jd-boyd avatar kennethgoodman avatar llluma avatar rkrp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

howlong's Issues

Add pytest tests

At the moment we don't really have proper tests so it would be nice to have pytest working and full unit tests implemented.

Default timer interval is too high

HowLong's default timer interval is 1 second. This time interval can thus not provide accurate time measurements for programs that execute in less than a second(which are a large percentage). Therefore, I think it'd be great if the interval is reduced to something much lower, like 0.1s.

I've created a PR for this - #41

Feature Proposal: Attach HowLong to a running process

Can we have a feature to attach to an already running process and give timing stats about that?

I regularly come across this scenario when I am running heavy resource intensive processes [say Linux kernel compilation or Android AOSP builds or downloading system updates]. It is fairly easy to forget running the command under howlong or *nix's time while launching the process. It would be great to keep track of how long something has been running even after it has been started.

I have a fairly solid knowledge of achieving that in Linux systems with proc support. Not sure about other operating systems, though.

Would love to hear your thoughts about this.

Feature Requests

I am currently looking for feature requests for the next release of HowLong. If you think you have an interesting feature, with a plausible use case, please feel free to open an issue so we can discuss it before a pull request ๐Ÿ˜„

Cannot parse programs with dashes and double dashes as arguments

Currently, we are not capable of spawning programs which takes arguments in the form of dashes or double dashes, (example: ls -a)

Running

howlong "ls -a"

results in

Running ls -a
Traceback (most recent call last):
  File "/usr/bin/howlong", line 11, in <module>
    load_entry_point('howlong==0.0.1', 'console_scripts', 'howlong')()
  File "/usr/lib/python3.5/site-packages/HowLong/HowLong.py", line 35, in howlong
    HowLong().run()
  File "/usr/lib/python3.5/site-packages/HowLong/HowLong.py", line 25, in run
    process = Popen(self.parsed_args.command)
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'ls -a'

and running

howlong ls -a

results in

usage: howlong [-h] [-i [interval]] C [C ...]
howlong: error: unrecognized arguments: -a

We can make use of argparse.REMAINDER for nargs to get all the arguments for the target program properly.

Would like to hear your thoughts before I can send a PR ๐Ÿ˜„

Fix early escape

When Ctrl-C is used to terminate the program, the process that is being run should also be killed. Currently not supported since.

See History from Command Line

It would be nice if the project have a command that show the whole history or import it to a file

P.S. I would like to work on this new feature

Adding AUTHORS file

I think it is best to add an AUTHORS file in the project root with the list of people who have contributed to the project.

Gives a better sense of accomplishment for fresh contributors too.

Compare to time

Perhaps the README could contain a piece comparing using howlong to using the system supplied time command?

Add an option to only keep latest log statement in terminal

The repeated log statements break up terminal outputs from the process. This may make it difficult to interpret the usual outputs from the process.

An option might be added to specify that only the last log statement should be kept in the terminal output. Previous log statements should be cleaned up as each new log statement is written.

For example:

$ howlong -c python helloworld.py
Running python helloworld.py
INFO:0:00:01.003903
Hello, World!
INFO:0:00:02.005022
Finished python helloworld.py

might become:

$ howlong --latest-only -c python helloworld.py
Running python helloworld.py
Hello, World!
INFO:0:00:02.005022
Finished python helloworld.py

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.