{"id":21130286,"url":"https://github.com/wasabeef/Takt","last_synced_at":"2025-07-09T01:33:03.800Z","repository":{"id":41676131,"uuid":"42095567","full_name":"wasabeef/Takt","owner":"wasabeef","description":"Takt is Android library for measuring the FPS using Choreographer.","archived":false,"fork":false,"pushed_at":"2021-03-12T08:27:40.000Z","size":13508,"stargazers_count":1145,"open_issues_count":10,"forks_count":109,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-11-12T12:53:04.343Z","etag":null,"topics":["android","android-library","fps"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wasabeef.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"wasabeef","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-09-08T06:59:59.000Z","updated_at":"2024-09-26T02:20:43.000Z","dependencies_parsed_at":"2022-07-08T00:09:10.613Z","dependency_job_id":null,"html_url":"https://github.com/wasabeef/Takt","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2FTakt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2FTakt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2FTakt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2FTakt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasabeef","download_url":"https://codeload.github.com/wasabeef/Takt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476370,"owners_count":17480215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-library","fps"],"created_at":"2024-11-20T05:32:31.482Z","updated_at":"2024-11-20T05:32:41.405Z","avatar_url":"https://github.com/wasabeef.png","language":"Java","funding_links":["https://github.com/sponsors/wasabeef"],"categories":["Libs","Debug"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-takt-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/2468)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/jp.wasabeef/takt/badge.svg)](https://search.maven.org/artifact/jp.wasabeef/takt)\n\n`Takt` is `Android` library for measuring the `FPS` using [`Choreographer`](http://developer.android.com/intl/ja/reference/android/view/Choreographer.html).  \n\n![Takt](art/takt.png)\n\nScreenshot\n---\n\n\u003cimg src=\"art/takt.gif\" width=\"50%\"\u003e\n\nHow do I use it?\n---\n\n### Setup\n\n##### Dependencies\n```groovy\nrepositories {\n  mavenCentral()\n}\n\ndependencies {\n  releaseImplementation 'jp.wasabeef:takt-no-op:2.1.1'\n  debugImplementation 'jp.wasabeef:takt:2.1.1'\n}\n```\n\n\n### Functions\n\nThere is a simple initialization step which occurs in your Application class:  \n**Simple**\n```java\nclass MyApplication : Application() {\n  override fun onCreate() {\n    super.onCreate()\n    Takt.stock(this)\n  }\n}\n```\n\n**Options**\n\n- `seat(Seat seat)` is a position\n- `interval(int ms)` is a interval\n- `color(int color)` is a text color.\n- `size(int size)` is a text size\n- `alpha(float alpha)` is a text alpha\n- `listener(Audience audience)` is a Listener\n- `useCustomControl` to manually start/stop Takt (disabled by default)\n- `showOverlaySetting` to enable/disable showing system overlay setting (enabled by default)\n\n```kotlin\nTakt.stock(this)\n  .seat(Seat.BOTTOM_RIGHT)\n  .interval(250)\n  .color(Color.WHITE)\n  .size(14f)\n  .alpha(.5f)\n  .listener { fps -\u003e\n    Log.d(\"Excellent!\", fps.toString() + \" fps\")\n\n    // Logcat\n    // jp.wasabeef.example.takt D/Excellent!﹕ 59.28853754940712 fps\n    // jp.wasabeef.example.takt D/Excellent!﹕ 59.523809523809526 fps\n    // jp.wasabeef.example.takt D/Excellent!﹕ 59.05511811023622 fps\n    // jp.wasabeef.example.takt D/Excellent!﹕ 55.33596837944664 fps\n    // jp.wasabeef.example.takt D/Excellent!﹕ 59.523809523809526 fps\n  }\n```\n\n**Position**\n\n```java\nTakt.stock(this)\n  .seat(Seat.RIGHT_CENTER)\n\n  /**\n   * TOP_RIGHT,\n   * TOP_LEFT,\n   * TOP_CENTER,\n   *\n   * CENTER,\n   * RIGHT_CENTER,\n   * LEFT_CENTER,\n   *\n   * BOTTOM_RIGHT,\n   * BOTTOM_LEFT,\n   * BOTTOM_CENTER\n   */\n```\n\n**Hide fps label**\n\n```java\nTakt.stock(this)\n  .hide()\n  .listener { fps -\u003e Log.d(\"Excellent!\", fps.toString() + \" fps\") }\n```\n\nRequirements\n--------------\nAndroid 4.1+ (using the [`Choreographer`](http://developer.android.com/intl/ja/reference/android/view/Choreographer.html))\n\nDeveloped By\n-------\nDaichi Furiya (Wasabeef) - \u003cdadadada.chop@gmail.com\u003e\n\n\u003ca href=\"https://twitter.com/wasabeef_jp\"\u003e\n\u003cimg alt=\"Follow me on Twitter\"\nsrc=\"https://raw.githubusercontent.com/wasabeef/art/master/twitter.png\" width=\"75\"/\u003e\n\u003c/a\u003e\n\nLicense\n-------\n\n    Copyright (C) 2020 Wasabeef\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasabeef%2FTakt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasabeef%2FTakt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasabeef%2FTakt/lists"}