1//
2// Copyright (c) Microsoft. All rights reserved.
3// Licensed under the MIT license. See LICENSE file in the project root for full license information.
4//
5
6#include "standardpch.h"
7#include "verbinteg.h"
8#include "simpletimer.h"
9#include "methodcontext.h"
10#include "methodcontextiterator.h"
11
12int verbInteg::DoWork(const char* nameOfInput)
13{
14 LogVerbose("Checking the integrity of '%s'", nameOfInput);
15
16 SimpleTimer st2;
17 st2.Start();
18
19 MethodContextIterator mci(true);
20 if (!mci.Initialize(nameOfInput))
21 return -1;
22
23 while (mci.MoveNext())
24 {
25 MethodContext* mc = mci.Current();
26 // Nothing to do except load the current one.
27 }
28
29 st2.Stop();
30 LogInfo("Checked the integrity of %d methodContexts at %d per second", mci.MethodContextNumber(),
31 (int)((double)mci.MethodContextNumber() / st2.GetSeconds()));
32
33 if (!mci.Destroy())
34 return -1;
35
36 return 0;
37}
38