Skip to content

fix(traceAnalyzer): rename --popularityDacay to --popularityDecay - #381

Merged
1a1a11a merged 2 commits into
developfrom
jason/jolly-volta-6hxu80
Nov 6, 2026
Merged

1a1a11a merged 2 commits into
developfrom
jason/jolly-volta-6hxu80

Conversation

@1a1a11a

@1a1a11a 1a1a11a commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

What does this PR do?

traceAnalyzer registered the popularity decay option as --popularityDacay. Because of that typo, the correctly spelled option failed:

./bin/traceAnalyzer ../data/cloudPhysicsIO.vscsi vscsi --popularityDecay
./bin/traceAnalyzer: unrecognized option '--popularityDecay'   # exit 64

--help also printed the misspelling, even though the task list in the help text already said popularityDecay.

  • libCacheSim/bin/traceAnalyzer/cli_parser.cpp: the option is renamed to --popularityDecay. There is no alias, so --popularityDacay is now rejected as an unrecognized option (exit 64). Breaking for any script that used the misspelling.

  • doc/quickstart_traceAnalyzer.md: the task table and the popularity decay example now use --popularityDecay, and the note explaining the typo is removed. No other file in doc/, README.md or scripts/ used popularityDacay.

  • test/test_cli.sh (testCLI): new cases in the option parsing section:

    • run --popularityDecay against cloudPhysicsIO.vscsi and check that it exits 0 and writes cloudPhysicsIO.vscsi.popularityDecay_w300_obj
    • check that --help lists --popularityDecay

    The run writes into its own directory, so the file check can't pass because of another run's output.

Type of change

  • Bug fix
  • New eviction / admission / prefetch algorithm
  • New trace reader or trace format
  • Performance improvement
  • Documentation
  • Build / CI
  • Other:

How was it tested?

cmake -G Ninja -B _build && ninja -C _build
ctest --test-dir _build --output-on-failure   # 15/15 passed

Checked by hand from _build:

  • --popularityDecay exits 0 and writes cloudPhysicsIO.vscsi.popularityDecay_w300_obj.
  • --popularityDacay fails with unrecognized option '--popularityDacay' (exit 64).
  • --help shows --popularityDecay.

To confirm the new tests catch the bug, I rebuilt traceAnalyzer from the original cli_parser.cpp and ran test_cli.sh: the new cases failed there and pass with this change.

On this short sample trace, the _obj file holds only its two header lines, because the trace ends before the default 1-day warmup. So the test checks that the option takes effect and the file is written, not what the analysis outputs.

  • ctest --test-dir _build --output-on-failure passes
  • Build is warning-free (CI uses -Wall -Wextra -Werror)

Checklist

  • Formatted with clang-format (or the pre-commit hook from scripts/setup_hooks.sh)
  • Added or updated tests
  • Added or updated documentation
  • New algorithms are registered in the CLI and listed in the README (not applicable)

🤖 Generated with Claude Code

https://claude.ai/code/session_015VD7LAJg16jcTU7MAhkm3G

…as alias

The popularity decay option was registered as --popularityDacay, so the
correctly spelled --popularityDecay failed with "unrecognized option"
(exit 64), and --help printed the misspelling. Register the option as
--popularityDecay and keep the old spelling as a hidden argp alias
(OPTION_ALIAS | OPTION_HIDDEN) so existing scripts keep working.

Update doc/quickstart_traceAnalyzer.md to use --popularityDecay and drop
the note that documented the typo.

Add testCLI cases that run both spellings against cloudPhysicsIO.vscsi,
check each exits 0 and writes cloudPhysicsIO.vscsi.popularityDecay_w300_obj,
and check that --help lists --popularityDecay but not the hidden alias.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015VD7LAJg16jcTU7MAhkm3G
@1a1a11a
1a1a11a requested a review from haochengxia as a code owner November 6, 2026 02:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T03:48:53.645414Z b8431f9 New commits
🔒 Security Review ✅ Completed 2026-11-06T03:49:39.219245Z b8431f9 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Only the correct spelling, --popularityDecay, is accepted now; the
misspelled --popularityDacay is rejected as an unrecognized option.
testCLI now covers just --popularityDecay and its --help entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015VD7LAJg16jcTU7MAhkm3G
@1a1a11a 1a1a11a changed the title fix(traceAnalyzer): accept --popularityDecay, keep --popularityDacay as alias fix(traceAnalyzer): rename --popularityDacay to --popularityDecay Nov 6, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8431f9902

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@1a1a11a
1a1a11a merged commit a5237ac into develop Nov 6, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants