quarta-feira, 25 de julho de 2012 19:53
maybe slightly off topic ... but how can i compute bytes sent/received over WCF during a sync?
Can i get it from the SFx?
I think i can get from WCF by getting values from NetworkAdapter before/after sync ... but i can't figure out how to know which network adapter was used for the sync?
Todas as Respostas
quinta-feira, 26 de julho de 2012 03:54Moderador
look at the ChangesApplied code and see if you can modify to fit your requirements.
- Marcado como Resposta P H T sexta-feira, 27 de julho de 2012 13:49
sexta-feira, 27 de julho de 2012 13:55
Thanks ... I can use the idea of Batches * BatchSize!
It will not be as precise as I hoped WCF data would be ... but it will definitely put me in the ballpark (only as precise as BatchSize is configured ... large BatchSize=less precision). Also, the example only processes data received ... if BatchSpooled and BatchApplied events do what it sounds like, I will probably use those events and compute both bytes sent and received.
terça-feira, 31 de julho de 2012 13:57
I can't get a batch count ...
I have my BatchSize set at 1024 and I can monitor the batching directory during a sync and do see batch files coming through.
I subscribed to the BatchSpooled and BatchApplied events but they never get fired. I subscribed to SyncProgress event which does get fired ... but DbSyncProgressEventArgs.BatchCount is always 0. I could use ChangesApplied (as answered above) to count batches received if I had an equivalent way to count batches being sent.
Any ideas on why the framework is not seeing batches (reports BatchCount=0 and does not fire batch related events)?
terça-feira, 31 de julho de 2012 14:01ModeradorWhich provider and where are you subscribing to the events?
terça-feira, 31 de julho de 2012 14:05
I have a method ConfigureProvider that is called when the sync button is pressed - it sets up all events.
(also ... how/where can I use "DbSyncContext returnedContext = new DbSyncContext();" to see if is recognized as batched?)
- Editado P H T terça-feira, 31 de julho de 2012 14:48