Skip to content

Commit

Permalink
codespell: pcsc-spy
Browse files Browse the repository at this point in the history
./src/spy/pcsc-spy:77: occurences ==> occurrences
./src/spy/pcsc-spy:565: lengh ==> length
./src/spy/pcsc-spy:946: occurences ==> occurrences
./src/spy/pcsc-spy:959: occurences ==> occurrences
  • Loading branch information
LudovicRousseau committed Feb 11, 2023
1 parent d976364 commit 5913b25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/spy/pcsc-spy
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class StatRecord(object):
self.name = name
self.executions = list()
self.total_time = 0
self.occurences = 0
self.occurrences = 0

def __repr__(self):
return self.name + ": " + repr(self.executions)
Expand Down Expand Up @@ -562,7 +562,7 @@ class PCSCspy(object):
if rv_text != "SCARD_S_SUCCESS":
return

def hex2int(data, lengh):
def hex2int(data, length):
return [int(x, 16) for x in data.split(" ")]

if dwControlCode == self.CM_IOCTL_GET_FEATURE_REQUEST:
Expand Down Expand Up @@ -943,7 +943,7 @@ class PCSCdemultiplexer(object):
stat = stats[thread]
for fct in stat:
record = stat[fct]
record.occurences = len(record.executions)
record.occurrences = len(record.executions)
record.total_time = sum(record.executions)

records = [stat[fct] for fct in stat]
Expand All @@ -956,7 +956,7 @@ class PCSCdemultiplexer(object):
for record in sorted(records, key=attrgetter('total_time'),
reverse=True):
print("%f sec (%3d calls) %5.2f%% %s" % (record.total_time,
record.occurences, record.total_time / total_time * 100.,
record.occurrences, record.total_time / total_time * 100.,
record.name))

thread_n += 1
Expand Down

0 comments on commit 5913b25

Please sign in to comment.