Page MenuHomeFreeBSD

Add ts(1) command
AcceptedPublic

Authored by otis on Jul 2 2022, 3:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 1, 6:08 PM
Unknown Object (File)
Fri, Nov 1, 6:08 PM
Unknown Object (File)
Fri, Nov 1, 6:08 PM
Unknown Object (File)
Fri, Nov 1, 6:08 PM
Unknown Object (File)
Fri, Nov 1, 6:08 PM
Unknown Object (File)
Fri, Nov 1, 6:04 PM
Unknown Object (File)
Fri, Oct 25, 6:21 AM
Unknown Object (File)
Sun, Oct 20, 7:37 PM

Details

Summary

Add /usr/bin/ts, a command that timestamps each line of its stdin
before it is being printed to stdout.

A typical use case is to profile shell scripts.

Obtained from: OpenBSD

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46250
Build 43139: arc lint + arc unit

Event Timeline

otis requested review of this revision.Jul 2 2022, 3:34 PM
  • Add ts to usr.sbin Makefile

I cant immediately spot any other nits with the mdoc, but perhaps you should add a note about when ts(1) was added to FreeBSD in the history section header?

Also, I can't wait for this one to land, it's super handy and I can't believe I didn't know about it until now. :)

contrib/ts/ts.1
18

I'm not quite sure about this one; it doesn't really follow existing syntax with the CVS expansion, and the date doesn't follow the "Month Day, Year" way that we usually designate the document date with.

25

.Nm has already been defined above, so I believe our convention is to shorten other instances of the document name.

I will note that this is done elsewhere in the mdoc file, so perhaps it's a change that should go upstream instead? That's up to you and upstream.

Address some manpage nits.

otis marked 2 inline comments as done.Jul 2 2022, 4:52 PM

mandoc -Tlint ts.1 did not show any warnings/errors.

Include sys/types.h instead of sys/cdefs.h

mdoc(7) looks good to me.

This revision is now accepted and ready to land.Jul 4 2022, 6:04 AM

Can you add a "relnotes: yes" line to the commit message? Thanks!

Move Imported to HISTORY manpage section

This revision now requires review to proceed.Jul 4 2022, 1:49 PM
jrtc27 added inline comments.
usr.bin/ts/Makefile
1

Don't add these to new files

Do not add $FreeBSD$ RCS tag.

otis marked an inline comment as done.Jul 4 2022, 4:50 PM

Other than the question, I'm still happy with the mdoc, so will accept once that's been answered.

contrib/ts/ts.1
105–106

Shouldn't this be .An -nosplit Juraj Lutter Aq Mt otis@FreeBSD.org .

otis marked an inline comment as done.Jul 6 2022, 6:13 AM
otis added inline comments.
contrib/ts/ts.1
105–106

Shouldn't this be .An -nosplit Juraj Lutter Aq Mt otis@FreeBSD.org .

No, as mandoc would throw an error (yes, I've consulted it with man mdoc) that says:

An -split | -nosplit | first_name ... last_name

That means: An with EITHER -split or -nosplit or first_name ... last_name

otis marked an inline comment as done.

Update to latest OpenBSD revision.

The TR for TS typo can be fixed on commit.

contrib/ts/ts.1
19
This revision is now accepted and ready to land.Jul 7 2022, 3:49 PM

The TR for TS typo can be fixed on commit.

Is there a reason this was never merged?