Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

So I'm using Unity's profiler to help debug some of my code in the standalone. I've got it running smoothly, and writing all it's data to a .data file which I can read.

However, the binary file Unity creates for profiler information gets quite huge very quickly. I'm hoping to get past this by writing the profiler data log to a zip archive. I have dotnetzip installed, and can add files to a zip archive.

What I'm trying to figure out is how I could possibly either write the profiler data log directly to the zip archive, or write the profiler binary data to a variable of some sort which I could store in a stream and write to the zip archive on quit. This way I won't ever have to have the large file on the user's drive.

Another option would be to continuously write the binary data to the log on the drive, then get the binary info from that log, write it to a stream, put it in to a zip archive, then delete the log. However I'd have to do this every few seconds, and that may get slightly process intensive.

share|improve this question
    
Unless the files being generated are hundreds of gigabytes, for the sake of development this seems rather unnecessary. You would have to write a system that streamlines the compression of data as it is written to a file. Also, whichever tool you need to analyze the data would have to uncompress it, or you uncompress it manually yourself before hand. Really it just makes for much slower iteration time. You mention large files on the users drive? Your customer should never be outputting profiler logs, as they should be running optimized release copies of the game. –  Evan Sep 20 '13 at 19:45
    
The files are generating roughly 1 gigabyte per minute of ingame time. And the tool can easily uncompress it. This is for alpha testing purely, I'd never have an end customer outputting profiler logs. The whole reason for this is so that the end customer CAN have an optimized copy of the game. This is a very common way development studios test their games. I'm surprised you haven't heard of alpha testing –  Timothy Williams Sep 20 '13 at 22:14
    
I understand the desired results, and I'm not sure how my comment is any indication of my knowledge of software development cycles. Either way, my experience with profiling games has never lead me to desire continuous high volume output for any extended period of time. Resource monitoring, and real-time profiling has yielded sufficient evidence to narrow down the focus for high volume profiling. If this is necessary though, time versus storage, the traditional trade off. –  Evan Sep 20 '13 at 23:30
    
I'm most likely either going to use a time versus storage method, or work out an archiving method. I'm thinking of saving the binary data to a stream which I can then write to a compressed archive. Although there are downsides to having a stream get too large. –  Timothy Williams Sep 22 '13 at 13:41

1 Answer 1

up vote 2 down vote accepted

So I figured out how to do this efficiently. What I do is every X minutes write all the data to a stream and delete the data file. This causes the data to not take up so much disc space. Then on application quit I write all that data from the stream to a compressed archive. I end up getting roughly 1 megabyte a minute from the Profiler, rather than 1 gigabyte.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.