Hi, I add TCL wrapper to http://libpmc.sf.net/
TCL might be old, but yet it is fast. Faster then Ruby, Perl, Python and even Lua Enjoy Erez debian@tsnlaptop:~/TSN/build/libpmc (master)$ ./testing.sh * build libpmc real 0m0.989s user 0m0.832s sys 0m0.174s * Create linuxptp.oRTVluCqPL with running linuxptp pmc real 0m0.124s user 0m0.016s sys 0m0.010s * Create libpmc.tool.8QJb7rZal3 with running libpmc real 0m0.005s user 0m0.001s sys 0m0.006s * We expect 'protocolAddress' and 'timeSource' difference * Statistics may apprear diff linuxptp.oRTVluCqPL libpmc.tool.8QJb7rZal3 < protocolAddress 3 c4:7d:46:20:ac:ae > protocolAddress IEEE_802_3 c4:7d:46:20:ac:ae < timeSource 0xa0 > timeSource INTERNAL_OSCILLATOR < timeSource 0xa0 > timeSource INTERNAL_OSCILLATOR ===== Run perl ===== real 0m0.045s user 0m0.037s sys 0m0.008s * We except real 'user desc' on '>' < get user desc: > get user desc: test123 ===== Run ruby ===== real 0m0.091s user 0m0.080s sys 0m0.012s ===== Run lua ===== lua 5.1 ---- real 0m0.015s user 0m0.012s sys 0m0.004s lua 5.2 ---- real 0m0.019s user 0m0.009s sys 0m0.011s lua 5.3 ---- real 0m0.017s user 0m0.018s sys 0m0.000s ===== Run python ===== python3.9 ---- real 0m0.089s user 0m0.046s sys 0m0.012s ===== Run php ===== real 0m0.023s user 0m0.013s sys 0m0.011s ===== Run tcl ===== real 0m0.012s user 0m0.007s sys 0m0.007s debian@tsnlaptop:~/TSN/build/libpmc (master)$ From: Erez <erezge...@gmail.com> Sent: Monday, 18 October 2021 10:32 To: Richard Cochran <richardcoch...@gmail.com> Cc: Geva, Erez (ext) (DI PA DCP R&D 3) <erez.geva....@siemens.com>; linuxptp-devel@lists.sourceforge.net Subject: Re: [Linuxptp-devel] [RFC PATCH 10/10] checksync: new program to wait for a local or remote clock to synchronize On Sat, 16 Oct 2021 at 16:46, Richard Cochran <richardcoch...@gmail.com<mailto:richardcoch...@gmail.com>> wrote: On Fri, Oct 15, 2021 at 10:48:28PM +0000, Geva, Erez wrote: > Regarding the "ugly scripting" of pmc. > > I create the > http://libpmc.sf.net/<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flibpmc.sf.net%2F&data=04%7C01%7Cerez.geva.ext%40siemens.com%7Cdef08208e4444c03621808d99211e156%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637701428500899042%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=pShFZwUeGcRcnotI%2FOvoCjFZwRtAxPDGkzU7%2FIYsMIo%3D&reserved=0> > just to work around this issue. > > The libpmc provides a library with pmc tool capabilities, and wrapper for > scripting as Python, Lua and Perl. I just took a look and saw the SWIG file. Neat! Now I can script pmc using tcl/tk. (Yes, that probably dates me, but still that is my go-to scripting language when the task is too complex for bash). Seems so, I will add Tcl/Tk. > I think pmc is as a testing tool for the linuxptp project, but not a real > tool for users. That is true, but people are still using it in production systems. Hopefully your library will provide a more flexible way going forward. Thanks, Richard Thanks Richard. I wrote it for production. It'll probably take time for people to learn about it. Thanks Erez _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net<mailto:Linuxptp-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/linuxptp-devel<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Flinuxptp-devel&data=04%7C01%7Cerez.geva.ext%40siemens.com%7Cdef08208e4444c03621808d99211e156%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637701428500899042%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=i12qNmtEp79LfETt9LDXWLtOdy3jwK3cy9HTXrXZank%3D&reserved=0>
_______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel