mirror of
https://github.com/andreas-abel/nanoBench.git
synced 2025-07-21 07:01:04 +02:00
28 lines
640 B
Python
Executable File
28 lines
640 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import argparse
|
|
from cacheLib import *
|
|
|
|
import logging
|
|
log = logging.getLogger(__name__)
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(description='Cache Information')
|
|
parser.add_argument("-logLevel", help="Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)", default='INFO')
|
|
args = parser.parse_args()
|
|
|
|
logging.basicConfig(stream=sys.stdout, format='%(message)s', level=logging.getLevelName(args.logLevel))
|
|
|
|
cpuidInfo = getCpuidCacheInfo()
|
|
|
|
print('')
|
|
print(getCacheInfo(1))
|
|
print(getCacheInfo(2))
|
|
if 'L3' in cpuidInfo:
|
|
print(getCacheInfo(3))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|