mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02:00
Progress indicator: Show number of active items
This commit is contained in:
parent
0e0dcf2c7e
commit
bf1f123b09
7 changed files with 39 additions and 28 deletions
|
@ -32,8 +32,7 @@ public:
|
|||
Activity(ActivityType type, std::string msg = "");
|
||||
~Activity();
|
||||
|
||||
template<typename... Args>
|
||||
void progress(const Args & ... args) const;
|
||||
void progress(uint64_t done = 0, uint64_t expected = 0, uint64_t running = 0, uint64_t failed = 0) const;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
|
@ -146,14 +145,4 @@ void warnOnce(bool & haveWarned, const FormatOrString & fs);
|
|||
|
||||
void writeToStderr(const string & s);
|
||||
|
||||
template<typename... Args>
|
||||
void Activity::progress(const Args & ... args) const
|
||||
{
|
||||
Event ev;
|
||||
ev.type = evProgress;
|
||||
ev.fields.emplace_back(id);
|
||||
nop{(ev.fields.emplace_back(Event::Field(args)), 1)...};
|
||||
logger->event(ev);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue