View README.md

Slow.py

Usage

$ xcodebuild clean build -workspace 'MyApp.xcworkspace' -scheme 'MyApp' OTHERFLAGS="-Xfrontend -debug-time-function-bodies" | tee xcode_raw.log
$ python slow.py xcode_raw.log
23559.6ms   ./Sources/A.swift:219:16    @objc dynamic func doneButtonDidTap()
23439.6ms   ./Sources/B.swift:763:8  @objc final func checkCondition()
View Array+ing.swift
// The MIT License (MIT)
//
// Copyright (c) 2016 Suyeol Jeon (xoul.kr)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
View UICollectionView+RxReachedBottom.swift
extension UICollectionView {
public var rx_reachedBottom: Observable<Void> {
return self.rx.contentOffset
.map { contentOffset in
var responder: UIResponder = self
var viewController: UIViewController? = nil
while let next = responder.next {
viewController = next as? UIViewController
if viewController != nil {
View ga-os-version-sub.js
(function() {
var VERSION = '8'
var total = 0;
$('#ID-explorer-table-pieTable tr')
.each(function(i, tr) {
var version = $(tr).find('td:nth-child(3)').text();
if (version.startsWith(VERSION)) {
var percentString = $(tr).find('td:nth-child(5)').text();
var percent = Number(percentString.split('%')[0]);
total += percent;
View ObservableConvertibleType+ActivityIndicator.swift
// The MIT License (MIT)
//
// Copyright (c) 2016 Suyeol Jeon (xoul.kr)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
View SR-1117.swift
/// A generic class
class Parent<T> {
func printName() {
print(self.name())
}
func name() -> String {
return "Parent"
}
View phone_number_formatter.php
<?php
function phone($str) {
$AREA_CODES = array("010", "02", "011", "031", "012", "032", "033", "041",
"015", "042", "016", "043", "017", "044", "018", "051",
"019", "052", "053", "054", "055", "061", "062", "063",
"064");
// 하이픈 모두 제거
$flattened = str_replace("-", "", $str);
View String+TitlecaseStringTests.swift
class StringTitlecasedTests: XCTestCase {
func testTitlecased() {
XCTAssertEqual("".titlecased(), "")
XCTAssertEqual("a".titlecased(), "A")
XCTAssertEqual("aBC".titlecased(), "A B C")
XCTAssertEqual("a b".titlecased(), "A B")
XCTAssertEqual("we're having dinner in the garden".titlecased(), "We're Having Dinner In The Garden")
XCTAssertEqual("TheSwiftProgrammingLanguage".titlecased(), "The Swift Programming Language")
}
View GoogleAnalytics.podspec
Pod::Spec.new do |s|
s.name = "GoogleAnalytics"
s.version = "3.14.0"
s.summary = "Google Analytics - measure your app performance"
s.description = "Google Analytics lets you track application events you care about and gain insights from discovery and installation to conversion and engagement"
s.homepage = "https://www.google.com/analytics"
s.license = { :type => "Copyright", :text => "Copyright 2015 Google Inc." }
s.author = "Google, Inc."
s.platform = :ios, "5.0"
s.frameworks = ["CoreData", "SystemConfiguration"]
View Weakify.swift
// The MIT License (MIT)
//
// Copyright (c) 2015 Suyeol Jeon (xoul.kr)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: