Skip to content

Commit

Permalink
Merge pull request #135 from MobileNativeFoundation/move-to-MobileNat…
Browse files Browse the repository at this point in the history
…iveFoundation
  • Loading branch information
BalestraPatrick authored May 11, 2021
2 parents 1712473 + 65fb966 commit 3583b8d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# XCLogParser

[![Build Status](https://github.com/spotify/XCLogParser/workflows/CI/badge.svg)](https://github.com/spotify/XCLogParser/workflows/CI/badge.svg)
[![Build Status](https://github.com/MobileNativeFoundation/XCLogParser/workflows/CI/badge.svg)](https://github.com/MobileNativeFoundation/XCLogParser/workflows/CI/badge.svg)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)


Expand Down Expand Up @@ -282,7 +282,7 @@ xclogparser parse --project MyApp --reporter json
</details>


For more information regarding each field, check out the [JSON format documentation](https://github.com/spotify/XCLogParser/blob/master/docs/JSON%20Format.md).
For more information regarding each field, check out the [JSON format documentation](https://github.com/MobileNativeFoundation/XCLogParser/blob/master/docs/JSON%20Format.md).


### FlatJson Reporter
Expand Down Expand Up @@ -381,7 +381,7 @@ xclogparser parse --file path/to/log.xcactivitylog --reporter flatJson
```
</details>
For more information regarding each field, check out the [JSON format documentation](https://github.com/spotify/XCLogParser/blob/master/docs/JSON%20Format.md).
For more information regarding each field, check out the [JSON format documentation](https://github.com/MobileNativeFoundation/XCLogParser/blob/master/docs/JSON%20Format.md).
### SummaryJson Reporter
Expand Down Expand Up @@ -426,7 +426,7 @@ xclogparser parse --file path/to/log.xcactivitylog --reporter summaryJson
</details>
For more information regarding each field, check out the [JSON format documentation](https://github.com/spotify/XCLogParser/blob/master/docs/JSON%20Format.md).
For more information regarding each field, check out the [JSON format documentation](https://github.com/MobileNativeFoundation/XCLogParser/blob/master/docs/JSON%20Format.md).
### ChromeTracer Reporter
Expand Down Expand Up @@ -523,7 +523,7 @@ XCLogParser is currently in alpha status. We are using it internally and tested
MacOS:
1. Clone the repo with `git clone [email protected]:spotify/XCLogParser.git`.
1. Clone the repo with `git clone [email protected]:MobileNativeFoundation/XCLogParser.git`.
2. Run `rake gen_resources` to generate a static resource Swift file that is needed to compile the app.
3. Run `swift package generate-xcodeproj` to generate a Xcode project (or use any text editor).
4. Run tests in Xcode directly (CMD + U) or using `rake test`.
Expand All @@ -535,7 +535,7 @@ Linux:
1. A Dockerfile is provided, you can create an image with the tag xlogparser: `docker build --tag xclogparser .`
2. To compile the app in Linux, just run the shell script: `./run-in-docker.sh`
If you find a bug or you would like to propose an improvement, you're welcome to create an [issue](https://github.com/spotify/xclogparser/issues/new).
If you find a bug or you would like to propose an improvement, you're welcome to create an [issue](https://github.com/MobileNativeFoundation/xclogparser/issues/new).

## Release

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SwiftCompilerFunctionTimeOptionParser: SwiftCompilerTimeOptionParser {
private func parse(command: String, occurrences: Int) -> [SwiftFunctionTime]? {
let functions: [SwiftFunctionTime] = command.components(separatedBy: "\r").compactMap { commandLine in

// 0.14ms /users/spotify/project/SomeFile.swift:10:12 someMethod(param:)
// 0.14ms /users/mnf/project/SomeFile.swift:10:12 someMethod(param:)
let parts = commandLine.components(separatedBy: "\t")

guard parts.count == 3 else {
Expand All @@ -58,7 +58,7 @@ class SwiftCompilerFunctionTimeOptionParser: SwiftCompilerTimeOptionParser {
// 0.14ms
let duration = parseCompileDuration(parts[0])

// /users/spotify/project/SomeFile.swift:10:12
// /users/mnf/project/SomeFile.swift:10:12
let fileAndLocation = parts[1]
guard let (file, line, column) = parseNameAndLocation(from: fileAndLocation) else {
return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ protocol SwiftCompilerTimeOptionParser {

extension SwiftCompilerTimeOptionParser {

/// Parses /users/spotify/project/SomeFile.swift:10:12
/// - Returns: ("file:///users/spotify/project/SomeFile.swift", 10, 12)
/// Parses /users/mnf/project/SomeFile.swift:10:12
/// - Returns: ("file:///users/mnf/project/SomeFile.swift", 10, 12)
// swiftlint:disable:next large_tuple
func parseNameAndLocation(from fileAndLocation: String) -> (String, Int, Int)? {
// /users/spotify/project/SomeFile.swift:10:12
// /users/mnf/project/SomeFile.swift:10:12
let fileAndLocationParts = fileAndLocation.components(separatedBy: ":")
let rawFile = fileAndLocationParts[0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SwiftCompilerTypeCheckOptionParser: SwiftCompilerTimeOptionParser {

private func parse(command: String, occurrences: Int) -> [SwiftTypeCheck]? {
return command.components(separatedBy: "\r").compactMap { commandLine in
// 0.14ms /users/spotify/project/SomeFile.swift:10:12
// 0.14ms /users/mnf/project/SomeFile.swift:10:12
let parts = commandLine.components(separatedBy: "\t")

guard parts.count == 2 else {
Expand All @@ -56,7 +56,7 @@ class SwiftCompilerTypeCheckOptionParser: SwiftCompilerTimeOptionParser {
// 0.14ms
let duration = parseCompileDuration(parts[0])

// /users/spotify/project/SomeFile.swift:10:12
// /users/mnf/project/SomeFile.swift:10:12
let fileAndLocation = parts[1]
guard let (file, line, column) = parseNameAndLocation(from: fileAndLocation) else {
return nil
Expand Down
2 changes: 1 addition & 1 deletion docs/Xcactivitylog Format.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,4 @@ Inside the logs you can find these classes:

If you search for them, you will find that they belong to the IDEFoundation.framework. A private framework part of Xcode. You can class dump it to get the headers of those classes. Once you have the headers, you will have the name and type of the properties that belong to the class. Now, you can match them to the tokens you got from the log. Some of them are in the same order than in the headers, but for others it will be about trial and error.

In the project you can find those classes with their properties in the order in which they appear in the log in the file (IDEActivityModel.swift)[https://github.com/spotify/XCLogParser/blob/master/Sources/XCLogParser/activityparser/IDEActivityModel.swift].
In the project you can find those classes with their properties in the order in which they appear in the log in the file (IDEActivityModel.swift)[https://github.com/MobileNativeFoundation/XCLogParser/blob/master/Sources/XCLogParser/activityparser/IDEActivityModel.swift].

0 comments on commit 3583b8d

Please sign in to comment.