{"id":18712363,"url":"https://github.com/codenameakshay/perf_driver","last_synced_at":"2025-11-09T19:30:18.564Z","repository":{"id":255351779,"uuid":"849324939","full_name":"codenameakshay/perf_driver","owner":"codenameakshay","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-14T07:44:46.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T08:27:37.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codenameakshay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-29T11:53:44.000Z","updated_at":"2024-11-14T07:39:51.000Z","dependencies_parsed_at":"2024-08-29T13:12:50.643Z","dependency_job_id":"c7ac8f58-9a3d-4447-b2f1-a5c1ba4883e2","html_url":"https://github.com/codenameakshay/perf_driver","commit_stats":null,"previous_names":["codenameakshay/perf_driver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenameakshay%2Fperf_driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenameakshay%2Fperf_driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenameakshay%2Fperf_driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenameakshay%2Fperf_driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codenameakshay","download_url":"https://codeload.github.com/codenameakshay/perf_driver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239576797,"owners_count":19662113,"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":[],"created_at":"2024-11-07T12:42:33.809Z","updated_at":"2025-11-09T19:30:18.515Z","avatar_url":"https://github.com/codenameakshay.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Performance Driver\n\nA Flutter package for running performance tests and generating detailed performance reports. This package helps developers analyze their app's performance metrics, including CPU usage, memory usage, widget build times, and frame rendering metrics.\n\n## Features\n\n- Collects performance data using Flutter's integration test framework.\n- Generates detailed markdown reports with performance metrics.\n- Provides suggestions for performance improvements based on collected data.\n- Supports custom performance baselines for tailored analysis.\n\n## Versions\n\nThe Performance Driver package offers two versions for running performance tests:\n\n1. **flutter_driver**:\n\n   - Uses the legacy `flutter_driver` package.\n   - Suitable for apps that are not yet migrated to the new integration testing framework.\n   - Provides a more traditional approach to UI testing.\n\n2. **integration_test**:\n   - Utilizes the newer `integration_test` package.\n   - Recommended for new projects as it offers better performance and more features.\n   - Supports more advanced testing scenarios and improved reporting.\n\n### Differences\n\n| Feature               | flutter_driver                    | integration_test                |\n| --------------------- | --------------------------------- | ------------------------------- |\n| Testing Framework     | Legacy `flutter_driver`           | New `integration_test`          |\n| Performance Reporting | Basic reporting capabilities      | Detailed markdown reports       |\n| Test Execution        | Slower due to legacy architecture | Faster and more efficient       |\n| API Support           | Limited to older APIs             | Full support for new APIs       |\n| Community Support     | Less active                       | Actively maintained and updated |\n\n## Getting Started\n\nTo use the Performance Driver package, follow these steps:\n\n1. **Add the dependency** to your `pubspec.yaml` file:\n\n   ```yaml\n   dependencies:\n     perf_driver: ^0.0.1\n   ```\n\n2. **Import the package** in your Dart file:\n\n   ```dart\n   import 'package:perf_driver/perf_driver.dart';\n   ```\n\n3. **Run performance tests** by creating a sample driver file in your project.\n\n## Usage\n\nTo run performance tests, you can use the `perfDriver` function. Here’s an example of how to set it up:\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:perf_driver/perf_driver.dart';\n\nvoid main() {\n  perfDriver();\n  // Or with custom baselines:\n  // perfDriver(customBaselines: PerformanceBaselines(...));\n}\n```\n\n### Example of Running a Performance Test\n\nYou can wrap your integration test with the `runPerformanceTest` method to generate a performance report:\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:integration_test/integration_test.dart';\nimport 'package:perf_driver/src/perf_src.dart';\n\nFuture\u003cvoid\u003e main() async {\n  IntegrationTestWidgetsFlutterBinding.ensureInitialized();\n\n  testWidgets('MyApp Tests', (tester) async {\n      await runPerformanceTest(\n    'My Performance Test',\n    testWidget: MyApp(),\n    tester: tester,\n    callback: (binding, tester) async {\n      // Interact with your app here\n      await tester.pumpAndSettle();\n    },\n  );\n});\n}\n\nclass MyApp extends StatelessWidget {\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        appBar: AppBar(title: Text('Performance Test')),\n        body: Center(child: Text('Hello, World!')),\n      ),\n    );\n  }\n}\n```\n\n## Additional Information\n\nFor more information on how to contribute to the package, file issues, or find more resources, please refer to the [Dart documentation](https://dart.dev/guides) and the [Flutter documentation](https://flutter.dev/docs).\n\n## License\n\nThis package is licensed under the MIT License. See the LICENSE file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenameakshay%2Fperf_driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodenameakshay%2Fperf_driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenameakshay%2Fperf_driver/lists"}