PrivateEyePack

14 views
Skip to first unread message

Greg Young

unread,
Mar 18, 2016, 8:37:55 AM3/18/16
to scriptcs
I created a ScriptPack for http://privateeye.io (REPL based profiler targeting F#). Now it works in ScriptCS as well. I havn't written up documentation on it yet but the methods are below. If people want to give it a try. https://gist.github.com/gregoryyoung/9738c8f558602a4428fa shows a run. (in this case eventstore is being profiled using mono --profile=peye:mode=connect EventStore.ClusterNode.exe)

If you want to use it you need to join the beta list on the website to get the actual backend profiler bits. Currently there is a backend for MS-CLR (windows) and mono (linux/OSX. if someone needs freebsd let us know :-D)

The only weird thing I have yet to fix (open to suggestions) can be seen here: https://github.com/scriptcs/scriptcs/issues/1139 but aside from that oddity everything seems to work.

Happy hacking!

Greg

void StartListening() 
void StartListeningOn(IPEndPoint endPoint) 
void ConnectTo(IPEndPoint endPoint) 

//helper methods (they are just linq statements over Profiler.Data.Methods/Types)
IEnumerable<MethodInformation> MostTimeMethods() 
IEnumerable<MethodInformation> MostTimeUnderMethods()
IEnumerable<MethodInformation> HighestAfferentMethods()
IEnumerable<MethodInformation> HighestEfferentMethods() 
IEnumerable<MethodInformation> MostCalledMethods()
IEnumerable<MethodInformation> MostActualAllocatingMethods()
IEnumerable<MethodInformation> MostAllocatingMethods()
IEnumerable<MethodInformation> ExceptionThrowingMethods()
IEnumerable<TypeInformation> MostAllocatedTypes() 
IEnumerable<TypeInformation> MostThrownTypes() 

event EventHandler<MethodEnteredEventArgs> MethodEntered
event EventHandler<MethodCalledEventArgs> MethodCalled
event EventHandler<MethodLeftEventArgs> MethodLeft
event EventHandler<ObjectAllocatedEventArgs> ObjectAllocated
event EventHandler<ExceptionThrownEventArgs> ExceptionThrown
event EventHandler<GCEventArgs> GCStart
event EventHandler<GCCompletedEventArgs> GCCompleted
event EventHandler<GCEventArgs> GCEnd

void EnableAllocationTracking()
void DisableAllocationTracking()
void EnableExceptionTracking()
void DisableExceptionTracking()
void EnableMethodTracking()
void DisableMethodTracking()
void EnableGCTracking()
void DisableGCTracking()
void AddIncludeFilter(string includeExpression)
void AddExcludeFilter(string excludeExpression)
void RemoveIncludeFilter(string includeExpression)
void RemoveExcludeFilter(string excludeExpression)
void ResetInternalProfilerSession() 
void ResetData() 

Greg Young

unread,
Mar 18, 2016, 9:15:12 AM3/18/16
to scriptcs
Oh if anyone wants to play now and not wait for next beta drop just
send me an email off list and I can give you a link to the bits
needed.
--
Studying for the Turing test

Filip W

unread,
Mar 20, 2016, 2:56:57 PM3/20/16
to Greg Young, scriptcs
Thanks a lot Greg, this is great!

Great to see PrivateEye available for C# too; I actually subscribed for the PrivateEye beta a while ago for this very reason, I wanted to explored the possibility of doing what you guys originally did for FSI with a C# REPL.

Gonna play around with it and provide some feedback.

cheers
Filip

Greg Young

unread,
Mar 20, 2016, 3:10:11 PM3/20/16
to Filip W, scriptcs
If you need any help getting things running check out the wiki here:
https://github.com/PrivateEye/PrivateEye/wiki/Beta-Users---Getting-Started
or drop a message on the beta list (in the email you got when you
signed up)
Reply all
Reply to author
Forward
0 new messages