|
My Google-fu is not working - I keep ending up with maths links! Does anyone have any links to articles / resources detailing the time overhead of logging to file? I've added logging to my undo functions to give a rough session activity trace and my boss is concerned about the time overhead wrt file access (I open, append, and flush every message).
Before I start timing things, can anyone speak about this from experience?
|
|
|
|
|
Actually the best way to do this is to whip up a quick test program. Should be very simple, I would benchmark 10,000 writes and see what the min/max/average time is. Also do this during disk operations (move a big file) to get a good measure.
|
|
|
|
|
A little CodeProject-fu can go a long way: [^].
That's only one of a number of excellent articles on CP relevant to precision Timeing in .NET. You should use the StopWatch Class, not a Timer.
good luck, Bill
"What Turing gave us for the first time (and without Turing you just couldn't do any of this) is he gave us a way of thinking about and taking seriously and thinking in a disciplined way about phenomena that have, as I like to say, trillions of moving parts.
Until the late 20th century, nobody knew how to take seriously a machine with a trillion moving parts. It's just mind-boggling." Daniel C. Dennett
|
|
|
|
|
If you're really concerned about the impact of logging to a file you can do the logging in a seperate thread dedicated to that functionality. This may be a bit more resource intensive than directly writing to the file but also reduces the cost on the main execution thread.
|
|
|
|
|
This is one of the reasons I would look for external sources for logging, rather than rolling my own version. There are any number of excellent logging systems, and I would have looked to use one of these instead. Saying that, there are several things that you can do to alleviate issues - log in the background, don't write to file on every log (build a buffer which you periodically flush to disk), investigate alternatives to writing to file.
|
|
|
|
|
This is essentially a debugging tool, since our users are rubbish at describing what they were doing when a problem / crash happened (aren't they all?). I started off logging to memory, then dumping the session log and call stack in my "crash-catcher". But then I was concerned about memory usage and likelihood-of-failure at the crucial moment, and obviously then my log wouldn't be available in non-crash situations. Since it is a CAD program and logging actions happen only a little more frequently than you can do things with a mouse, I don't think the overhead will be significant - but I'll probably have to do some timings to prove it to my boss!
I'll also chuck in a settings switch to turn logging off if necessary, that should keep everyone happy
|
|
|
|
|
|
Yet again Amazon has failed at that. They never cease to amaze with WTFs!
Getting information off the Internet is like taking a drink from a fire hydrant.
- Mitchell Kapor
|
|
|
|
|
Dang and I just ordered one for $120K, shoulda waited for the roll-back!
|
|
|
|
|
Do you know what this is?
No?
Then let me tell you.
Someone has put this up for a huge amount of money because they are embezzling money from the company they work for.
It is under $100,000 which is presumably an amount that requires supervisory authority.
They make the purchase, presumably hidden under some bland narrative as Technical Equipment and have the cost sent to a paypal account.
The trouble is that people are stupid.
There will be a full audit trail leading right back to them.
Also, Amazon, eBay etc are all aware of this type of fraud and you can bet your bottom dollar they are monitoring it.
Accountants are not stupid, and will pick this stuff up in the annual audit.
I certainly would question the bona fides of such an amount.
---------------------------------
Obscurum per obscurius.
Ad astra per alas porci.
Quidquid latine dictum sit, altum videtur .
|
|
|
|
|
Interesting. The seller (bonbonshop) has several other items[^] for sale, each priced at CAD 99.999.00.
/ravi
|
|
|
|
|
Somebody's fired
www.dirkstechblog.blogspot.com
|
|
|
|
|
Either that or fired up!
/ravi
|
|
|
|
|
Yeah, definitely a procurement fraud.
the employee will get the company to buy as much as possible, very quickly, then disappear.
It sounds simple, but it will inevitably end in tears before bedtime for the crooked employee.
Much better to sneak snaller amounts through over a longer time span.
As I said before though, most people who try accountancy frauds are unaware of the controls in place or the trail they leave.
You never hear of accountants defrauding people, do you?
---------------------------------
Obscurum per obscurius.
Ad astra per alas porci.
Quidquid latine dictum sit, altum videtur .
|
|
|
|
|
This[^] is one of my favorite shows. Amazing how gullible people can be - even those who ought to have known better.
/ravi
|
|
|
|
|
Greed, heedless of wisdom, has brought many a man down.
---------------------------------
Obscurum per obscurius.
Ad astra per alas porci.
Quidquid latine dictum sit, altum videtur .
|
|
|
|
|
Indeed - even otherwise rational and intelligent ones.
/ravi
|
|
|
|
|
Just heard back from Amazon (pretty quick, methinks):
"Our investigations team will look into the situation and take appropriate action."
/ravi
|
|
|
|
|
Dalek Dave wrote: You never hear of accountants defrauding people, do you?
Although they managed to get their conviction overturned (due to a courtroom error on the judges part) Arthur Andersen[^] were initially convicted for their part in the Enron debacle.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Just notified Amazon. Gave you anonymous credit for the feedback.
/ravi
|
|
|
|
|
I can see that you've researched this very carefully, and in great detail.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
One of the courses you have to pass in order to get certified by CIMA is about fraud and embezzlement.
It is a surprisingly large and interesting section of the curriculum.
---------------------------------
Obscurum per obscurius.
Ad astra per alas porci.
Quidquid latine dictum sit, altum videtur .
|
|
|
|
|
Dalek Dave wrote: One of the courses you have to pass in order to get certified by CIMA is about fraud and embezzlement. That section is obviously funded by the Mafia, who was sick of their accountants getting caught.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
you actually managed to get something done over the weekend - Now one out of two school projects is finished, and I can focus onto the other one (which is gonna be a though bit of work, gotta hand it in on January 8th next year). I got the first article which is documenting the first part of my project (Explain serial communication, using an Arduino Board as example device) through the approval queue yesterday, and now the second one, a 3D Cylinder Chart based on WPF, is in the queue. And I can finally lean a bit back and enjoy the rest of the weekend (about 2 hours, but eh! It is something).
Veni, vidi, caecus
|
|
|
|