{ "id": "134380", "key": "TIMOB-17472", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-09-30T22:17:40.000+0000", "created": "2014-08-08T06:44:17.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "hudder" ], "versions": [], "issuelinks": [ { "id": "39675", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "127507", "key": "TIMOB-16617", "fields": { "summary": "Collect simple Titanium API usage statistics", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T18:39:02.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10207", "name": "Tooling" } ], "description": "Our goal is to convert the API data from the CLI into useful information about which are the most used APIs\r\n\r\nHigh-level process:\r\n\r\n# Grab compressed JSON files from /appcelerator.analytics.datastore/desktop/2014/07 and later (the feature was only released in mid-July)\r\n# Parse the JSON for all events with feature ID \"ti.apiusage\". A sample item might appear like (note that API data itself is escaped)\r\n{code}\r\n{\r\n \"event\": \"Titanium API Usage\",\r\n \"type\": \"ti.apiusage\",\r\n \"sid\": \"971063aa-1b36-470a-9933-a6d02679a975\",\r\n \"guid\": \"cf5c67ed-1c3b-494b-afe0-01b958ef0f40\",\r\n \"mid\": \"78f11f954dc9107fbe9f9b1b449f46b2\",\r\n \"mac_addr\": \"\",\r\n \"ip\": \"\",\r\n \"creator_user_id\": \"1559790\",\r\n \"app_name\": \"Titanium Command-Line Interface\",\r\n \"app_version\": \"3.3.0\",\r\n \"version\": \"3.3.0\",\r\n \"tz\": \"-120\",\r\n \"ver\": \"2\",\r\n \"un\": \"internet@createurdimage.fr\",\r\n \"data\": \"{\\\"platform\\\":\\\"iphone\\\",\\\"tisdkname\\\":\\\"3.3.0.v20140711123603\\\",\\\"tisdkver\\\":\\\"3.3.0\\\",\\\"deployType\\\":\\\"production\\\",\\\"target\\\":\\\"dist-appstore\\\",\\\"usage\\\":{\\\"Titanium.Locale.getCurrentLanguage\\\":10,\\\"Titanium.App.Properties.getString\\\":110,\\\"Titanium.App.Properties.setString\\\":9,\\\"Titanium.App.fireEvent\\\":50,\\\"Titanium.Platform.displayCaps.platformHeight\\\":3,\\\"Titanium.Platform.displayCaps.platformWidth\\\":159,\\\"Titanium.Platform.osname\\\":6,\\\"Titanium.Network.createHTTPClient\\\":63,\\\"Titanium.API.info\\\":61,\\\"Titanium.API.log\\\":31,\\\"Titanium.UI.createTableViewSection\\\":16,\\\"Titanium.UI.createAnimation\\\":64,\\\"Titanium.UI.createWindow\\\":19,\\\"Titanium.UI.createImageView\\\":60,\\\"Titanium.UI.createView\\\":169,\\\"Titanium.UI.FIll\\\":45,\\\"Titanium.UI.createButton\\\":37,\\\"Titanium.UI.createLabel\\\":96,\\\"Titanium.UI.Size\\\":50,\\\"Titanium.UI.SIZE\\\":99,\\\"Titanium.UI.createScrollView\\\":6,\\\"Titanium.UI.FILL\\\":24,\\\"Titanium.UI.createTableView\\\":13,\\\"Titanium.Filesystem.getFile\\\":11,\\\"Titanium.Filesystem.tempDirectory\\\":8,\\\"Titanium.UI.createOptionDialog\\\":7,\\\"Titanium.Media.showCamera\\\":7,\\\"Titanium.UI.createAlertDialog\\\":14,\\\"Titanium.Media.NO_CAMERA\\\":7,\\\"Titanium.Media.openPhotoGallery\\\":7,\\\"Titanium.Filesystem.applicationDataDirectory\\\":3,\\\"Titanium.App.addEventListener\\\":20,\\\"Titanium.UI.createTableViewRow\\\":8,\\\"Titanium.UI.Fill\\\":3,\\\"Titanium.UI.createTextField\\\":9,\\\"Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE\\\":2,\\\"Titanium.UI.createTextArea\\\":2,\\\"Titanium.UI.createScrollableView\\\":1,\\\"Titanium.UI.createPicker\\\":4,\\\"Titanium.UI.PICKER_TYPE_DATE\\\":2,\\\"Titanium.Locale.getCurrentCountry\\\":1,\\\"Titanium.Contacts.getAllPeople\\\":1,\\\"Titanium.Contacts.contactsAuthorization\\\":2,\\\"Titanium.Contacts.AUTHORIZATION_AUTHORIZED\\\":1,\\\"Titanium.Contacts.AUTHORIZATION_UNKNOWN\\\":1,\\\"Titanium.Contacts.requestAuthorization\\\":1,\\\"Titanium.Platform.openURL\\\":1,\\\"Titanium.Platform.Android\\\":9,\\\"Titanium.UI.PICKER_TYPE_TIME\\\":1,\\\"Titanium.UI.PICKER_TYPE_DATE_AND_TIME\\\":1,\\\"Titanium.UI.PORTRAIT\\\":1,\\\"Titanium.UI.UPSIDE_PORTRAIT\\\":1,\\\"Titanium.UI.iPhone.TableViewSeparatorStyle.NONE\\\":2,\\\"Titanium.App.version\\\":2,\\\"Titanium.UI.createSearchBar\\\":1,\\\"Titanium.App.Properties\\\":1,\\\"Titanium.API.warn\\\":11,\\\"Titanium.Database.open\\\":6,\\\"Titanium.API.debug\\\":2,\\\"Titanium.Database.install\\\":1,\\\"Titanium.Database\\\":1,\\\"Titanium.version\\\":1,\\\"Titanium.UI.ActivityIndicatorStyle.DARK\\\":1,\\\"Titanium.UI.iPhone.ActivityIndicatorStyle.PLAIN\\\":1,\\\"Titanium.UI.createActivityIndicator\\\":1,\\\"Titanium.API.error\\\":1,\\\"Titanium.Platform.id\\\":2,\\\"Titanium.Platform.name\\\":1,\\\"Titanium.App.analytics\\\":1,\\\"Titanium.App.sessionId\\\":1,\\\"Titanium.App.deployType.toLowerCase\\\":1,\\\"Titanium.UI.createWebView\\\":1}}\",\r\n \"id\": \"7f26c3ed-cd66-5832-deeb-0b49-2227d851\",\r\n \"os\": \"Mac OS X\",\r\n \"platform\": \"osx\",\r\n \"osver\": \"10.9.4\",\r\n \"ostype\": \"64bit\",\r\n \"oscpu\": \"2\",\r\n \"memory\": \"4294967296\",\r\n \"node\": \"0.10.13\",\r\n \"npm\": \"1.3.2\",\r\n \"server_ts\": \"2014-08-01T08:01:10-07:00\",\r\n \"server_mid\": \"78f11f954dc9107fbe9f9b1b449f46b2\"\r\n}\r\n \r\n{code}\r\n## sid: Session ID\r\n## guid: CLI App ID\r\n## mid: Machine ID\r\n## id: Event ID\r\n# Create a data storage mechanism that allows you to initially provide the following information:\r\n# Top 500 APIs in order of usage, descending. Each unique App ID only contributes once to the tally\r\n\r\n\"jq\" is a useful tool for parsing JSON. This strips out only the useful events:\r\n\r\n{code}\r\nls -laS | grep \".*\\.json.txt.gz\" | head -n1 | awk '{print $NF}' | xargs gzip -dc | jq 'select(.type == \"ti.apiusage\") | [{id, data}] | group_by(.id)' | less\r\n{code}\r\n\r\nOnce that's complete, provide a data storage that allows us to query the data easily to ask questions like:\r\n\r\n# Given a set of APIs, how many applications can be implemented 100%", "attachment": [], "flagged": false, "summary": "Tooling: Analyze CLI API analytics data for top-used functionality", "creator": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "326536", "author": { "name": "mdadu", "key": "mdadu", "displayName": "Muhammad Dadu", "active": false, "timeZone": "Europe/London" }, "body": "A website has been made to analyze CLI API analytics data for top-used functionality.\r\n\r\nThis can be accessed here. http://api-analytics.appcelerator.com", "updateAuthor": { "name": "mdadu", "key": "mdadu", "displayName": "Muhammad Dadu", "active": false, "timeZone": "Europe/London" }, "created": "2014-09-30T22:17:40.000+0000", "updated": "2014-09-30T22:17:40.000+0000" }, { "id": "414298", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T18:39:02.000+0000", "updated": "2017-03-21T18:39:02.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }