Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing absolute value #2

Closed
grekon opened this issue Feb 3, 2012 · 3 comments
Closed

Missing absolute value #2

grekon opened this issue Feb 3, 2012 · 3 comments

Comments

@grekon
Copy link

grekon commented Feb 3, 2012

After running I have a
Type Name Calls Self Time Total Time
columns in my gamemode-profile.html.

As i could understand Self Time Total Time are in %.
I have tried to use all formats: txt, html, xml. I could not understand what does Self Time and Total Time means. If it is really percents, that from what value?
How can i watch absolute time in ms?

@grekon
Copy link
Author

grekon commented Feb 3, 2012

I have seen your profile_writer_html.
You do:
static_cast(info->GetSelfTime() * 100) / time_all
Why is it so?
I think it'll be a good idea to add an absoulte value column.
For Example I have a lot of fs and I want to understand which of them exactly slows my server. But if I have only a percents, I can only compare functions in one script.

I saw void PerformanceCounter::Stop(). Am I right that the child time is the time of all functions called from current fuction?

What enviroment do you use. I have not a unordered_map container in my Visual Studio 2008. It will be nice if you attach a project file to you source code.

@Zeex
Copy link
Owner

Zeex commented Feb 3, 2012

The reason was that percents are easy to read and understand quickly while the real numbers are too huge (they are nanoseconds). But you are free to change this behaviour (and as I see you already know how to do that :) )

The environment I use is Visual Studio 10/11 but MinGW is able to compile this too (and it has better C++11 support). VS 2008 has no support for C++11 features so you can't compiler there I think.

I don't attach the project file because I usually generate it with CMake - http://www.cmake.org/cmake/resources/software.html

@grekon
Copy link
Author

grekon commented Feb 4, 2012

Here is my variant: http://pastebin.com/GmZYZShw
It is more informative and looks well too, because all coumns are fit into the screen. If you want, you can add it ito you project. I have divided nanosecond by 1000 to get microseconds. Why do you use nanosecod? As I saw, the minimal value of the time is 1000 ns.

As you can see, I put time_all and total_time_all calculation in one foreach.
What is the difference beetween info->total_time() - info->child_time(); and info->GetSelfTime()?
As I could understand from TimeInterval GetSelfTime() const { return total_time() - child_time(); } it is the same.

I hava compiled it using minGW but my .dll have 2.3 Mb Size!!! But it works))) Can you advice any compiler options to reduce the size? Your dll size is less then 200 Kb.

I saw your Copyright (C) 2011-2012 Sergey Zolotarev. Do you speak Russian? I am from Russia too. It'll be easly to speek on Russain.

Good Luck with you plugin. Is very very useful! Great thanks to you!!1.

P.S. My e-mail is kosayk007@ya.ru. I will be glad to help you with your plugin development and may be to work together by other projects. Our team is working under samp rp-server development. Write me your contacts if you are intereseted in further communication. (но лучше на русском)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants