All Projects → CUITCHE → PerformanceAnalyzer

CUITCHE / PerformanceAnalyzer

Licence: MIT license
Under the iOS platform, the analyzer is a tool which statistics CPU, FPS, Memory, Loading-Time and provides the output of statistical data. And contain SQL execution time monitor base on FMDatabase and UI refresh in main thread monitor

Programming Languages

objective c
16641 projects - #2 most used programming language
Objective-C++
1391 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to PerformanceAnalyzer

Ios Monitor Platform
📚 iOS 性能监控 SDK —— Wedjat(华狄特)开发过程的调研和整理
Stars: ✭ 2,316 (+5414.29%)
Mutual labels:  monitor, fps
audria
audria - A Utility for Detailed Ressource Inspection of Applications
Stars: ✭ 35 (-16.67%)
Mutual labels:  monitor, analyzer
Cetus-GUI
cetus web端管理工具
Stars: ✭ 53 (+26.19%)
Mutual labels:  monitor
ioq3
The ioquake3 community effort to continue supporting/developing id's Quake III Arena
Stars: ✭ 2,067 (+4821.43%)
Mutual labels:  fps
Unknown-Logger
An advanced Windows Keylogger with features like (Disable CMD, Screenshotter, Client Stub Builder, Low Level Keyhooks, Hide Application, Respawner, Delete Chrome and Firefox data, and more!)
Stars: ✭ 23 (-45.24%)
Mutual labels:  monitor
YappyGitLab
A GitLab monitor bot for Discord
Stars: ✭ 51 (+21.43%)
Mutual labels:  monitor
IDKwGL
WebGL 3D rendering framework w/ support for file loaders, multiple material types and basic AABB physics.
Stars: ✭ 15 (-64.29%)
Mutual labels:  fps
CtrlUI
CtrlUI (Controller User Interface) is a Windows application, game and emulator launcher for your game controller, DirectXInput converts your game controller to a Xbox (XInput) controller, Fps Overlayer is a tool that shows the frames per second and the cpu, gpu and memory information.
Stars: ✭ 39 (-7.14%)
Mutual labels:  fps
SAPNetworkMonitor
Based on niping for sap network monitoring QQ群: 651878914
Stars: ✭ 48 (+14.29%)
Mutual labels:  monitor
monitor
mac 实时网速监控 bandwidh monitor
Stars: ✭ 23 (-45.24%)
Mutual labels:  monitor
Cometary
Roslyn extensions, with a touch of meta-programming.
Stars: ✭ 31 (-26.19%)
Mutual labels:  analyzer
mp4analyser
mp4 file analyser written in Python
Stars: ✭ 50 (+19.05%)
Mutual labels:  analyzer
TFM
Tyler's Frame Machine is a simple, free, educational, and portable tool for testing, benchmarking, comparison, and demonstration. TFM supports OpenGL, DirectX 11, DirectX 12, Metal, and most importantly, Vulkan! https://tylemagne.github.io/TFM
Stars: ✭ 63 (+50%)
Mutual labels:  fps
discord
GitHub webhook that analyzes pull requests and adds comments about incompatible CSS
Stars: ✭ 29 (-30.95%)
Mutual labels:  analyzer
gochanges
**[ARCHIVED]** website changes tracker 🔍
Stars: ✭ 12 (-71.43%)
Mutual labels:  monitor
exengine
A C99 3D game engine
Stars: ✭ 487 (+1059.52%)
Mutual labels:  fps
ZKShS
Search shodan without any knowledge about its queries
Stars: ✭ 37 (-11.9%)
Mutual labels:  monitor
bull-monitor
🐂 Standard UI for Bull and BullMQ.
Stars: ✭ 89 (+111.9%)
Mutual labels:  monitor
WikiChron
Data visualization tool for wikis evolution
Stars: ✭ 19 (-54.76%)
Mutual labels:  analyzer
chrome-extension-aspectratio219
🖥️ Fit the screen properly in fullscreen mode on monitor ultrawide with 21:9 aspect ratio (Netflix, Youtube, PrimeVideo, Crunchyroll)
Stars: ✭ 28 (-33.33%)
Mutual labels:  monitor

PerformanceAnalyzer

Under the iOS platform, the analyzer is a tool which statistics CPU, FPS, Memory, Loading-Time and provides the output of statistical data. And contain SQL execution time monitor base on FMDatabase and UI refresh in main thread monitor

Preface

Because of the needs of project, I write the code for performance analyzer. As above, the analyzer can statistic some app-data, such as CPU, FPS, Memory, Loading-Time. And the memory overhead may be large because analyzer statistics every 0.5s defaultly(except FPS, it does it every 1s). So If you really care about memory overhead, you can switch off other statistical items and only open the Memory statistical item. As for how to turn off, you can see the detailed in below chapters.

Features

  • Statistic CPU, FPS, Memory, PageLoading-time. And them can be controled to show.
  • Custom set the end flag of Loading-time.
  • Skip modules which you don't want.
  • Freedom to turn on or turn off by shake the iPhone device.
  • Generate output file in sandbox.
  • SQL execution time monitor. Set the threshold of the time. If timeout, you will receive notification.
  • UI refresh monitor. If a view does not refresh in main thread, you will receive notification.
  • Get statistical data.

How To Use

  • Copy directory PerformanceAnalyzer/CHPerformanceAnalyzer/CHPerformanceAnalyzer/PerformanceAnalyzer/ to your project.
  • Run your APP!!! Don't need to do anythig except that.

Demo - Screenshot

You can move it to anywhere.

Extended Use

Custom data statistics

You can define CHPerformanceAnalyzerShowType CHPerformanceAnalyzerShowTypeSetting; anywhere in the global to control statistical items. The value of CHPerformanceAnalyzerShowType just see CHGlobalDefines.h

Custom AppDelegate

Generally, your app delegate which is a class follows UIApplicationDelegate protocol is AppDelegate. But if not, you need define NSString *CHPerformanceAnalyzerApplicationDelegateClassName = @"YourAppDelegate"; anywhere in the global.

You can complete above things in source code CHPerformancerExterns.m. Defaultly, there has some content and you may need to modify it.

How To Get Statistical Data

  • Analyzer will save current statistical data to sandbox when you tap statistical window twice by two fingers.
  • CHPerformanceAnalyzer has a delegate which follows CHPerformanceAnalyzerDelegate protocol which contains an optional method - (void)performanceAnalyzer:completeWithFilePath:. Delegate will tell you fullpath of data save when you trigger save operation.
  • Analyzer save the data at shared directory of sandbox. You can add field Application supports iTunes file sharing into 'info.plist' and set it to YES. And then connect the iPhone to iTunes. And select Application item at iTunes and slide down to 'File Sharing' bar at right side. Finally, select your app, and later you can see content like below picture. File performance.txt saved the data
  • The format of statistical data is CSV-fromat of Excel. It can be import into Excel. You can find the import-tutorial at here(uhm..Chinese needed). Remember the separator is comma(',') defaultly. And If occur problem when transforming, I suggest that thansform the original data to CN-encoding such as 'GB2312' before import.

Custom Set the End Flag of Loading-Time

Sometimes view controller is special, that is, finishing loading the whole view is needed much time and meanwhile method - (void)viewDidAppear: has been called. So, we need make a method to represent 'END FLAG' and replace analyzer's 'END FLAG'. Detailed code is in CHPerformancerExterns.m.

    @interface WebViewController (PageLoading)

    @end

    @implementation WebViewController (PageLoading)

    - (void)loadView_aop2
    {
        CHPerformanceAnalyzer *analyzer = [CHPerformanceAnalyzer sharedPerformanceAnalyzer];
        // Observered Model. Make analyzer become observer of the self to concern the property path'navigationItem.title'.
        [analyzer addObservered:self forKeyPath:@"navigationItem.title"];
        // Fixed position.
        [self loadView_aop2];
    }

    - (void)viewDidDisappear_aop:(BOOL)animated
    {
        [self viewDidDisappear_aop:animated];
        CHPerformanceAnalyzer *analyzer = [CHPerformanceAnalyzer sharedPerformanceAnalyzer];
        // '[analyzer addObservered:self forKeyPath:@"navigationItem.title"];' must be called, otherwise there will throw exception.
        [analyzer removeObservered:self forKeyPath:@"navigationItem.title"];
    }
    
    @end

    void(^CHPerformanceAnalyzerAOPInitializer)() = ^{
        CHPerformanceAnalyzer *analyzer = [CHPerformanceAnalyzer sharedPerformanceAnalyzer];
    [analyzer registerLoadingRuleWithClass:[WebViewController class]
                          originalSelector:@selector(loadView)
                                    newSEL:@selector(loadView_aop2)];
    [analyzer registerLoadingRuleWithClass:[WebViewController class]
                          originalSelector:@selector(viewDidDisappear:)
                                    newSEL:@selector(viewDidDisappear_aop:)];
    };

Finishing a webpage when method - (void)webViewDidFinishLoad: has been called. I change the title of navigation. Function [analyzer addObservered:self forKeyPath:@"navigationItem.title"] make anlayzer become observer of controller to concern the property path navigationItem.title. When its value has been changed, analyzer will receive notification and update the loading-time. You can also concern other property path. I just throw out a minnow to catch a whale.

In [self loadView_aop2] and CHPerformanceAnalyzerAOPInitializer

[analyzer registerLoadingRuleWithClass:[WebViewController class]
                      originalSelector:@selector(loadView)
                                newSEL:@selector(loadView_aop2)];

Their order cannot be reversed.

Note: can't use loadView_aop as your name of custom method. Analyzer uses the name in the internal. If you do, program will go into infinite recursion until stack overflow.

Statistical Data Interface

Now, you can get all of module names which analyzer statisticed through property modulesOfStatistic. According to the modules, call method - (id)statisticsWithType:ofKey: to get statistical data. Generally, the method returns a NSArray object. To be currency in the future, write return type to id.

Turn Off the Statistic

Shake the phone to turn off analyzer, turn on shake again.

Note

  • The module which Analyzer got comes from property title of viewController. If it's nil, analyzer will find from property title of navigationItem. And if still nil, analyzer will try to call method - (NSString *)performanceAnalyzer: titleMethodWithViewController: of analyzer's delegate.
  • The loading-time is cacluated from that before calling - (void)loadView to finish calling - (void)viewDidAppear:

Requirement

Releases

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].