Skip to content

Instantly share code, notes, and snippets.

View bhamiltoncx's full-sized avatar

Ben Hamilton (Ben Gertzfield) bhamiltoncx

View GitHub Profile
@bhamiltoncx
bhamiltoncx / gist:10773115
Last active August 29, 2015 13:59
fiplr profile on large project
Function Name Call Count Elapsed Time Average Time
grizzl-search 3 4.587966 1.5293219999
cl-reduce 7 4.320245 0.6171778571
grizzl-search-increment 2 4.04251 2.021255
cl-find-if 145181 2.6578149999 1.830...e-05
cl-find 145181 1.8015009999 1.240...e-05
cl-position 145181 0.6899349999 4.752...e-06
grizzl-display-result 3 0.6235310000 0.2078436666
grizzl-result-strings 3 0.6227400000 0.2075800000
grizzl-inc-rank 109145 0.3308219999 3.031...e-06
@bhamiltoncx
bhamiltoncx / gist:10778030
Created April 15, 2014 21:33
fiplr profile with gethash
grizzl-display-result 3 24.298264 8.0994213333
grizzl-result-strings 3 24.297416000 8.0991386666
grizzl-search 3 6.912207 2.304069
cl-reduce 7 6.906552 0.9866502857
grizzl-search-increment 2 6.610875 3.3054375
gethash 4498983 5.2661100000 1.170...e-06
cl-find-if 145181 2.9374450000 2.023...e-05
cl-find 145181 2.2323239999 1.537...e-05
cl-position 145181 1.1798549999 8.126...e-06
grizzl-inc-rank 109145 1.0502399999 9.622...e-06
@bhamiltoncx
bhamiltoncx / gist:9fee96fcdc125d00940b
Created March 4, 2015 22:55
Verbose run of Immutables processor
[bgertzfield@beng-mbp:~/devtools/buck]% javac -XprintRounds -XprintProcessorInfo -J-verbose -cp third-party/java/immutables/value-2.0-SNAPSHOT.jar -processorpath third-party/java/immutables/value-standalone-2.0-SNAPSHOT.jar -proc:only -s build/foo Foo.java
[Opened /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.lang.Object from /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.io.Serializable from /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.lang.Comparable from /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.lang.CharSequence from /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.lang.String from /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.lang.reflect.AnnotatedElement from /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre
% javac -cp ~/src/immutables/value/target/value-2.0.10.jar -s generated src/foo/Foo.java src/bar/Bar.java
warning: Abstract generator process, processing over false, error raised false
Note: Static env init
warning: Abstract generator round
src/bar/Bar.java:6: warning: Extracting imports
public interface Bar {
^
warning: Extracting source for element bar.Bar (bar/Bar.java)
warning: Could not collect imports for bar.Bar: java.io.FileNotFoundException: bar/Bar.java
src/bar/Bar.java:6: warning: Got imports: org.immutables.value.internal.$generator$.$SourceExtraction$Imports@3bd94634: all=[] classes={}
Buildfile: /Users/bgertzfield/devtools/buck/build.xml
checkversion:
compile-testrunner:
compile-bootstrapper:
dx-check-build:
Buildfile: /Users/bgertzfield/devtools/buck/build.xml
checkversion:
compile-testrunner:
compile-bootstrapper:
dx-check-build:
% buck build buck
[snip]
generate-immutables:
[mkdir] Created dir: /path/to/devtools/buck/build/immutables
[javac] Compiling 56 source files
[javac]
[javac]
[javac] The system is out of resources.
% PYTHONPATH=/tmp/path-to/third-party/py/pathlib /usr/bin/python2
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pathlib
>>> dir(pathlib)
['EINVAL', 'ENOENT', 'Path', 'PosixPath', 'PurePath', 'PurePosixPath', 'PureWindowsPath', 'S_ISBLK', 'S_ISCHR', 'S_ISDIR', 'S_ISFIFO', 'S_ISLNK', 'S_ISREG', 'S_ISSOCK', 'Sequence', 'WindowsPath', '_Accessor', '_Flavour', '_NormalAccessor', '_PathParents', '_PosixFlavour', '_PreciseSelector', '_RecursiveWildcardSelector', '_Selector', '_TerminatingSelector', '_WildcardSelector', '_WindowsFlavour', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '_cached', '_is_wildcard_pattern', '_make_selector', '_normal_accessor', '_posix_flavour', '_py2', '_py2_fs_encoding', '_py2_fsencode', '_windows_flavour', 'attrgetter', 'basestring', 'contextmanager', 'fnmatch', 'functools', 'intern', 'io', 'nt', 'ntpath', 'os', 'posixpath',
% ls -l /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs
total 8
drwxrwxr-x 12 root wheel 408 Apr 14 13:36 iPhoneSimulator.sdk
lrwxr-xr-x 1 root wheel 19 Apr 14 13:34 iPhoneSimulator8.3.sdk -> iPhoneSimulator.sdk
% echo "int main() {}" > test.m
% clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -mios-simulator-version-min=7.0 -o test test.m
% clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk -mios-simulator-version-min=7.0 -o test8.3 test.m
% otool -l test | grep -A 3 LC_VERSION_MIN_IPHONEOS
cmd LC_VERSION_MIN_IPHONEOS
cmdsize 16
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.405 s
[INFO] Finished at: 2015-09-03T10:35:36-07:00
[INFO] Final Memory: 27M/312M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:jar (default) on project nuprocess: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - /Users/bgertzfield/src/NuProcess/src/main/java/com/zaxxer/nuprocess/NuProcess.java:43: error: reference not found
[ERROR] * process is terminated by the {@link #destroy()} method, the exit code is non-deterministic.